I developing a windows project in visual studio 2005. I noticed some code is not getting the right results. In the following code sample, If Not IsNothing(ID) Then, is always true. I checked the Value of ID and it was &H0.
How can I fix this? Thanks in advance
Public Sub Login(ByVal UserName As String, ByVal Password As String, ByVal RememberMe As Boolean)
Dim ID As Integer
ID = clsDatabase.GetReaderSingleValue("SELECT ID FROM tblUsers WHERE Username = '" & UserName & "' AND Password = '" & Password & "'", CommandType.Text)
If Not IsNothing(ID) Then
Authenticated = True