Password Validation |
| Swapnil Salunke replied to Timothy Purvis at 04-Jul-08 12:15 |
HEllO Timothy Purvis
this is your code only I have modified hope this will work theres no need to give two queries
Call ConnectRS(CN, RS, "SELECT name,password FROM staff where name ='" & txtName.Text & "'") If RS.RecordCount = 0 Then ' Means here the Username is incorrect MsgBox "Invalid Name entered", vbCritical txtName.Text = "" CN.Close Call ConnectDB(CN, App.Path & "\users.mdb") Exit Sub else ' Means here the UserName is correct check for the PWD if (txtpassword.text = rs!password) { 'User Autenticated } else { ' Passowrd Wrong } End If RS.Close
Hope this will help you Happy Coding takecare Bye |
|