Hi,
I have the following code.
Dim RD As System.Data.SqlClient.SqlDataReader
Try 'Try2
OpenConnection()
RD = cmdSQL.ExecuteReader
While RD.Read = True
UserIDSQL = CInt(RD.Item("UserID"))
EncUserNameSQL = CStr(RD.Item("UserName"))
EncPasswordSQL = CStr(RD.Item("Password"))
PassExpirationDateSQL =
CDate(RD.Item("PasswordExpirationDate"))
IPAddressSQL = CStr(RD.Item("IPAddress"))
AllowOnlyThisIPAddress =
CBool(RD.Item("AllowOnlyThisIPAddress"))
AllowLoginFromWeb =
CBool(RD.Item("AllowLoginFromWeb"))
End While
Catch ex As Exception
msgbox(ex.Message)
Finally
CloseConnection()
End Try
I get some strange behavior.
When Run, it does not set values to variables in 'While' block.
When Debug it goes to line 'While RD.Read' and the next line executed is
'Finally'
Why?
TIA