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
Printable View
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
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
[email protected]
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 ?