Help login screen

alhlwany

New member
Joined
Mar 13, 2010
Messages
2
Programming Experience
Beginner
how can i make login form in vb.net 2008
I wrote code
But I can not understand what does not work
Please wish for the swift answer
I upload the project to( CustomerCarrying_ACCESS.rar)
project name "customercarring.access"
mohamed
cairo egypt
 
I found the error
The name of the table"user" of reserved words
syntx erorr
Here is the code
Dim sql = "SELECT Usr ,Pas FROM user WHERE Usr='" & TextBox1.Text & "' AND PAS='" & TextBox2.Text & "'"
cmd = New OleDbCommand(sql, conn)
conn.Open()
Dim dr As OleDbDataReader = cmd.ExecuteReader
Try
If dr.Read = False Then
MessageBox.Show("Authentication failed...")
Else
MessageBox.Show("Login successfully...")
MAIN.Show()
Me.Hide()
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try

conn.Close()
 
Don't use reserved words for tables, columns, etc, because they will be interpreted as those reserved words in your code and produce invalid syntax. If you must use reserved words then wrap them in brackets to force them to be interpreted as identifiers.
 
Back
Top