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

Parameter query from a vb.net form to an mdb database

Status
Not open for further replies.

rambleon

Programmer
Mar 6, 2004
130
IL
I need to construct a Select statment to query an mdb database from a vb.net windows form.
The Select statement is:
SELECT * from EmployeeTable Where EmployeeNumber = Me.EmployeeNumberTxt

Me.EmployeeNumberTxt is input from a TextBox on the form before executing the query.
Can someone please tell me what the format of this parameter query should be.

Thanks

Rambleon
 
You could try:

"SELECT * FROM EmployeeTable WHERE EmployeeNumber = " + Me.EmployeeNumberTxt.Text


Hope this helps.
 
Thanks for your reply, I haven't tried it yet. I also discovered the following format (which I haven't tried either):

SELECT * FROM EmployeeTable WHERE (EmployeeNumber = ?)

Is this type of parameter query OK with mdb (Access 2000) databases
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top