I don't really have an answer to this, but to rule out the reader code (and increase performance) you could use a SELECT COUNT (combined with an output parameter if you're using stored procedure) instead of an entire SELECT.
Right now, you do a full SELECT, only to see if the Reader can read.
Try something like this instead:
Code:
Dim cmdResults As SqlClient.SqlCommand
cmdResults = New SqlClient.SqlCommand("SELECT COUNT(*) from SurveyResults where QuestionID=" & v_strQuestionID & " AND UserId='" & strUserID & "' AND SurveyTimeStamp='" & strTimeStamp & "'", m_conResults)
Dim rdrResults As SqlClient.SqlDataReader
Try
rdrResults = cmdResults.ExecuteReader
If rdrResults.Read Then
CanFindSurveyResults = (mySqlDataReader.GetInt32(0) > 0)
...
Not sure if it makes a difference, but it at least speeds up the operation by not selecting all the records if you only need a simple count.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Moon Over Marin by
Dead Kennedys (Track 13 from the album:
Plastic Surgery Disasters + In God We Trust)
What's This?