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 GetOrderSession Id(ByVal OrderId As
Integer) As String
Dim myDR As SqlDataReader
myDR = SqlHelper.Execu teReader
(ConfigurationS ettings.AppSett ings("connectio nString"), _
CommandType.Tex t, "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 GetOrderSession Id(ByVal OrderId As
Integer) As String
Dim myDR As SqlDataReader
myDR = SqlHelper.Execu teReader
(ConfigurationS ettings.AppSett ings("connectio nString"), _
CommandType.Tex t, "Select SessionId from
Orders where OrderId = " & OrderId)
If myDR.Read = True Then 'ERROR HERE
Return myDR("SessionId ")
End If
myDR.Close()
End Function
Comment