Advertisement
Guest User

Stack overflow

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