Checking a textbox against a DB field in an IF statement
How do I check a textbox.text value against a database field in an "IF" statement? For example:
If "Databasefield" <> txtPassword.text Then
lblError.visible = True
datagrid1.visible = False
End if
I already have the connectivity set up and the login works. If the user logs in with a username and corresponding password, then their personal records will be returned to them for editing purposes. However, if they enter a username / password that is not in the database then an empty datagrid is returned. I know this might not be the best password login since it is possible that 2 users could potentially register the same username and password. Im new to this so its the best I can do right now.
Thanks in advance
How do I check a textbox.text value against a database field in an "IF" statement? For example:
If "Databasefield" <> txtPassword.text Then
lblError.visible = True
datagrid1.visible = False
End if
I already have the connectivity set up and the login works. If the user logs in with a username and corresponding password, then their personal records will be returned to them for editing purposes. However, if they enter a username / password that is not in the database then an empty datagrid is returned. I know this might not be the best password login since it is possible that 2 users could potentially register the same username and password. Im new to this so its the best I can do right now.
Thanks in advance