hi,
I've implemented forms authentication on a web application. The form is just your standard "enter your user name and password" form and when the user enters their login credentials, I open a connection to a database to get that user.
Here's my SQL
SELECT * FROM Employees WHERE UserName ='" & txtUserName.text & "' AND Password ='" & txtPassword.text & "';"
The question how do I test for an empty recordset if the user enters invalid login credentials? I've been using the Read method like:
If Dataset.Read = false then
'login is invalid
Does anybody see a problem with using this method and/or is there a better way?
Thanks
I've implemented forms authentication on a web application. The form is just your standard "enter your user name and password" form and when the user enters their login credentials, I open a connection to a database to get that user.
Here's my SQL
SELECT * FROM Employees WHERE UserName ='" & txtUserName.text & "' AND Password ='" & txtPassword.text & "';"
The question how do I test for an empty recordset if the user enters invalid login credentials? I've been using the Read method like:
If Dataset.Read = false then
'login is invalid
Does anybody see a problem with using this method and/or is there a better way?
Thanks