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!

adoquery 1

Status
Not open for further replies.

kyriakos70

Programmer
Jul 24, 2008
87
0
0
GR
And a last question, how can I add an edit.text as a value in an sql string?
eg 'select * from scan inner join Table1 on scan.id_2=Table1.id Where scan.id_2="edit1.text"'
I get an error invalid column name.

thank you
Kyriakos
 
Try something like
Code:
'SELECT *
 FROM scan
 INNER JOIN Table1 ON scan.id=Table1.id
 WHERE scan.id_2 = ' 
+ QuotedStr(edit1.text)

Andrew
Hampshire, UK
 
What may be a good idea is change it to uppercase. Check 'Upper' is acceptable in the database you're using

Code:
'SELECT *
 FROM scan
 INNER JOIN Table1 ON scan.id=Table1.id
 WHERE upper(scan.id_2) = '
+ QuotedStr(uppercase(trim(edit1.text)))
 
what i can access to fields of database by CodeGear and then thay post to a value or array

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top