Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim con As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=P:\POS System\POS System Database.mdb")
- Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM Login Info WHERE Username = 'user" & txtStaffID.Text & "' AND password = 'user" & txtPassword.Text & "' ", con)
- con.Open()
- Dim sdr As OleDbDataReader = cmd.ExecuteReader()
- If (sdr.Read() = True) Then
- 'Pass verification and go to main form.
- Me.Hide()
- Else
- MsgBox("Sorry, The Username or Password was incorrect.", MsgBoxStyle.Critical, "Information")
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement