Ok it's probably not acting up and I've done something wrong, but I seem to be blind sighted completely in pinpointing the problem...
Here's a test code I was working on to make a simple login test:
I just created label1 and label2 to see if that indeed was the text within those string variables. And it was. I was a small table which is searched. I enter the correct username and password but I just keep getting "boo" in the message box.
conSQL and passComSQL are defined as well. Spot the problem?
Here's a test code I was working on to make a simple login test:
VB.NET:
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
Dim user, pass, compare As String
user = txtUser.Text
pass = txtPass.Text.ToString
conSQL.Open()
passComSQL.CommandText = "select pass from admins where name = '" & user & "'"
compare = passComSQL.ExecuteScalar.ToString
conSQL.Close()
Label1.Text = pass
Label2.Text = compare
If pass = compare Then
MsgBox("Cool")
Else
MsgBox("boo")
End If
End Sub
I just created label1 and label2 to see if that indeed was the text within those string variables. And it was. I was a small table which is searched. I enter the correct username and password but I just keep getting "boo" in the message box.
conSQL and passComSQL are defined as well. Spot the problem?