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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting Database Query For UserName

Status
Not open for further replies.

tempoman

Programmer
May 9, 2000
41
0
0
AU
Can someone help a newbie in Visual Basic .NET.

I currently have a form which checks to see if the username is present in the database and if so checks the password.

I am using the Data Adapter Configuration Wizard to access the database. However I can't see to be able to access the form values in the "Query Builder"

-------------------------
SELECT OwnerID, OwnerSname, [Password]
FROM Owner
WHERE (OwnerSname LIKE '%Form1!UserNameBox.[Text]%')
-----------------------------

This doesn't work. Can the form access be done here or does it have to be done on the actual form, something like this (with the where clause insert somewhere here)?

----------------------------------------------

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Users1.Clear()
OleDbDataAdapter1.Fill(Users1)
Me.BindingContext(Users1, "Owner").Position = 0
End Sub

-------------------------------------------


Thanks alot for any suggestions

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top