Oledb Connection
Oledb Connection
OleDb
Public Class login
Dim con As OleDbConnection
Dim val As Boolean
Dim sel As OleDbCommand
Dim reader As OleDbDataReader
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
sel = New OleDbCommand("select * from login where user='" &
TextBox1.Text & "'and pass='" & TextBox2.Text & "' ", con)
reader = sel.ExecuteReader
While reader.Read
val = True
End While
If val Then
ProgressBar1.Visible = True
Timer1.Enabled = True
Else
TextBox1.Text = ""
TextBox2.Text = ""
MsgBox("Type correct password")
End If
End Sub
End Class