Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login...Using 2 tables with Username & Password

Status
Not open for further replies.

eulogy6

Programmer
Apr 30, 2004
26
Hi to all,

I have 2 tables checking for correct username & password, something like that:

Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim username As String
Dim password As String

username = Me.txtusername.Text
password = Me.txtpassword.Text

If (username <> "" And password <> "") Then
' how can I check both tables Users(UserID,Username,Password) & UsersX(UserID,Username,Password) ?

Else

lbldetails.Text = "Invalid password"
End If
End Sub

Thanx in advanced
 
Either create a Stored Procedure that checks each table, or create one SP that checks one and then the next and returns a status to you.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
are the usernames same in both the table? if yes, then do a inner join and set a where clause. better option would be to use a SP...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top