K
Kelly E
Here's my function. I keep getting 'Object not set to an
instance of an object when I call myDR.Read. (I'm using
the Application Data blocks v1). I have similar routines
throughout this project that work - I don't see any code
differences. Any suggestions???
Private Function GetOrderSessionId(ByVal OrderId As
Integer) As String
Dim myDR As SqlDataReader
myDR = SqlHelper.ExecuteReader
(ConfigurationSettings.AppSettings("connectionString"), _
CommandType.Text, "Select SessionId from
Orders where OrderId = " & OrderId)
If myDR.Read = True Then 'ERROR HERE
Return myDR("SessionId")
End If
myDR.Close()
End Function
instance of an object when I call myDR.Read. (I'm using
the Application Data blocks v1). I have similar routines
throughout this project that work - I don't see any code
differences. Any suggestions???
Private Function GetOrderSessionId(ByVal OrderId As
Integer) As String
Dim myDR As SqlDataReader
myDR = SqlHelper.ExecuteReader
(ConfigurationSettings.AppSettings("connectionString"), _
CommandType.Text, "Select SessionId from
Orders where OrderId = " & OrderId)
If myDR.Read = True Then 'ERROR HERE
Return myDR("SessionId")
End If
myDR.Close()
End Function