I found this along my way of trying to learn how to use databases
1."SELECT usname, password FROM userinfo " &
2." WHERE usname = '" & textbox1.Text & "'" &
3." AND [password] = '" & textbox2.Text & "'"
I would like to know how I would execute code based on the result. I've put this code directly below the cmd select. I'm a newby so be nice. Using VB.Net 2010 and SQL database on win7 system. Thanks for your help.
If UserName = TxtUserName.Text and password = TxtPassword.Text Then
Do this bit of code
Else
Do this bit if code
End If
I get an error that Username has not been declared