Click here to Skip to main content
15,899,474 members

Comments by CARisk3 (Top 18 by date)

CARisk3 20-Jun-13 14:48pm View    
Then the last question hearAbout they can check more than one answer and four of them can cause a specify input box to come up. This means I could have an extra four rows at the end of my dataset that I don't have for each grouping.

Since I didn't get any answers right away, I started trying to code it like this:

If ds.Tables(0).Rows.Count() > (11 + rowValue) Then
If ds.Tables(0).Rows.Count() > (11 + rowValue) Then
For i = (11 + rowValue) To ds.Tables(0).Rows.Count()
If ds.Tables(0).Rows(i).Item("DynamicQuestionID") = GUID Then
specifyOther += " Name: " & ds.Tables(0).Rows(i).Item("response")
ElseIf ds.Tables(0).Rows(i).Item("DynamicQuestionID") = GUID Then
specifyOther += " Search: " & ds.Tables(0).Rows(i).Item("response")
ElseIf ds.Tables(0).Rows(i).Item("DynamicQuestionID") = GUID Then
specifyOther = "Referrer: " & ds.Tables(0).Rows(i).Item("response")
ElseIf ds.Tables(0).Rows(i).Item("DynamicQuestionID") = GUID Then
specifyOther = " Other: " & ds.Tables(0).Rows(i).Item("response")
Else
specifyOther = " Specify: " & ds.Tables(0).Rows(i).Item("response")
End If

Next
End If

Would there be a more efficient way to do this? The issue is I have to capture all the rows but don't know how many there will be.
CARisk3 20-Jun-13 14:39pm View    
Okay for a form there are 8 questions that need answered. For question 4 and 8 they are actually check a box to answer with being allowed to check more than one box. For answer 4 only one answer will cause the specify other box to come up so I coded it this way so I could capture the sequential answers without having to write different processes:

dim rowValue as integer = 1

Dim type As String = "Event Type: " & ds.Tables(0).Rows(3).Item("response")

If type = "Other" Or ds.Tables(0).Rows(3).Item("DynamicQuestionID") = GUIID Then
Dim eventOther As String = "Specify: " & ds.Tables(0).Rows(4).Item("response")
rowValue = 1
End If

Dim eLoc As String = "Location: " & ds.Tables(0).Rows(4 + rowValue).Item("response")
Dim eDate As DateTime = "Date: " & ds.Tables(0).Rows(6 + rowValue).Item("response")
Dim eTime As String = "Time of Day: " & ds.Tables(0).Rows(7 + rowValue).Item("response")
Dim eBudget As String = "Expected Budget: " & ds.Tables(0).Rows(9 + rowValue).Item("response")
Dim hearAbout As String = "Heard About Us:" & ds.Tables(0).Rows(10 + rowValue).Item("response")
CARisk3 13-Feb-12 13:00pm View    
Okay. I guess I should have been more specific in the background information. We don't own this information or the system that the information is stored on. It's PHI (personal health information) data and it's not store in an sql database. It's stored in an application specific storage. The connection string not only contains user name and password but also the location of the stored data.
CARisk3 16-Jun-11 15:24pm View    
Okay, I found some articles on the different types of Session State and I'm going to try using the SQL Server one. I'll post how things go and if the solution works. For information on what I'm trying look at the following articles:
http://msdn.microsoft.com/en-us/library/ms972429.aspx[^] Very in depth article from MSDN

Couple of articles on Code Project
ASP.NET Session Management Internals[^]

Exploring Session in ASP.Net[^]
CARisk3 12-Apr-11 16:33pm View    
I usually do but because this one is using the same control field I'm not worried about it. And the system automatically turned them into questions marks. It seems like when I try to change them it ends up with an error. So it's working for now and I'm leaving it alone.

Carolyn