FadetoBlack
Member
- Joined
- Mar 11, 2006
- Messages
- 7
- Programming Experience
- Beginner
I have a table in sql server with some member id and passwords ,I need to verify the validity.I wrote the cose for a single user /password the code im pasting below.Im just stuck when there are multiple users .Just need a lil bit of help in this .Thx
VB.NET:
str = "select uid ,pass from members where UID='" & TextBox1.Text & "' AND PASS='" & TextBox2.Text & "'"
comm = New SqlCommand(str, conn)
Dim dr As SqlDataReader = comm.ExecuteReader
Try
If dr.Read = False Then
MessageBox.Show("Wrong Username/Password")
Else
MessageBox.Show("Login successfull")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try