Login, its work

Markoleo

Member
Joined
Aug 5, 2006
Messages
19
Programming Experience
Beginner
VB.NET:
Dim cs As String = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=E:\any.mdb"
 
Dim b As String
im con1 As New OleDb.OleDbConnection
Dim dr As OleDb.OleDbDataReader
Dim cmd As New OleDb.OleDbCommand
 
Dim strselect As String = "Select Admin,lozinka from admin where Admin = '" & User.Text & "' and Lozinka = '" & Password.Text & "'"
 
Try
con1 = New OleDb.OleDbConnection(cs)
con1.Open()
cmd.Connection = con1
cmd.CommandText = strselect
dr = cmd.ExecuteReader
 
If dr.Read Then
 
If User.Text = dr("Admin") And Password.Text = dr("Lozinka") Then
 
Avio.login()
 
b = dr("Admin")
 
Avio.Text = "Avio - Login Admin " & b
 
Exit Sub
 
End If
 
Else
 
MessageBox.Show("Invalid Id")
 
End If
 
 
If User.Text = "" Then
MessageBox.Show("Please enter something")
End If
 
 
Catch ex As Exception
 
 
on main form
 
 
 
Function login() As Boolean
 
LoginAdmin.Close()
Menu1.Visible = 0
Menu2.Show()
 
 
 
 
 
 
End Function
 
Last edited by a moderator:
So, uh, whats the question? More can be done to help you after we know where you are having problems. :)
 
Back
Top