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!

Connecting a variable to a ADOQuery.SQL.Text (Access)

Status
Not open for further replies.

MelodyRogueAngel

Programmer
Aug 18, 2012
7
ZA
Hi how do you connect a certain ADOQuery.SQL.Text value to a variable? Here's an example however it's wrong:

...
Var
sAnimal, sNumber : String;
...
sNumber := edtNumber.text;
sAnimal := ADOQuery.SQL.Text := 'Select Name_Of_Animal From Animals Where Number = ' + sNumber;
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top