P
Problematic coder
Dim objdr As Data.OracleClient.OracleDataReader = Nothing
Dim objcnn As Data.OracleClient.OracleConnection = Nothing
Dim objcom As Data.OracleClient.OracleCommand
objcom = New
Data.OracleClient.OracleCommand(BuildSQL("Notes", id), objcnn)
objdr = objcom.ExecuteReader
objdr.Read()
If objdr.HasRows Then 'Everything OK so far
While objdr.Read() 'Jumps straight to End If here
'do something, it never gets here
End While
Else
'do something else
End If
I am using the code above, it passes through "If objdr.HasRows Then"
so obviously has rows, however as soon as it gets to the next line it
jumps to "End If"
I also tried it using "Do while objdr.read() - Loop" and got the same
behavour, I don't understand why it won't loop through the results,
there is definately at least one row, but it needs to be able to
handle several rows, hence the loop
Dim objcnn As Data.OracleClient.OracleConnection = Nothing
Dim objcom As Data.OracleClient.OracleCommand
objcom = New
Data.OracleClient.OracleCommand(BuildSQL("Notes", id), objcnn)
objdr = objcom.ExecuteReader
objdr.Read()
If objdr.HasRows Then 'Everything OK so far
While objdr.Read() 'Jumps straight to End If here
'do something, it never gets here
End While
Else
'do something else
End If
I am using the code above, it passes through "If objdr.HasRows Then"
so obviously has rows, however as soon as it gets to the next line it
jumps to "End If"
I also tried it using "Do while objdr.read() - Loop" and got the same
behavour, I don't understand why it won't loop through the results,
there is definately at least one row, but it needs to be able to
handle several rows, hence the loop