Click to See Complete Forum and Search --> : ADO - using data environment


John Reynolds
August 7th, 2001, 11:46 AM
Where can I read about entering an SQL statement as one on my commands (Connection1) such as SELECT * FROM Customers WHERE CUSTID = ? and the CUSTID would be supplied by the user at run time. Thanks for any input!

John

Iouri
August 7th, 2001, 11:53 AM
At the run time when user entered his name, assign it to a variable string (sName) and then call the SQL
sSQL = "SELECT * FROM Customers WHERE CUSTID = '" & sName & "'"

Iouri Boutchkine
iouri@hotsheet.com

John Reynolds
August 7th, 2001, 12:02 PM
That will work, but I thought there was a way to enter your SQL statement as a Command & somehow reference the variable to the unknown in the SQL statement which is designated by a ?