Click to See Complete Forum and Search --> : Variables in SQL statements
casox
Jan 4th, 2000, 01:25 AM
How do I include a variable in an SQL statement? ie What is wrong with this one? strQuery = "Select * From JobStatusEntries Where FormNum = FormNumber" I get "No value given for one or more required parameters" when I try to adodc1.refresh the control. Thanks,
casox
MartinLiss
Jan 4th, 2000, 02:04 AM
Here's an example
SQL = "DELETE FROM SavedSystems WHERE SystemName = " & "'" & sSysName & "'"
And just in case you can't read it, the symbols around the variable sSysName are a single quote within double-quotes.
------------------
Marty
[This message has been edited by MartinLiss (edited 01-04-2000).]
casox
Jan 4th, 2000, 09:24 PM
Martin,
It works! Thanks much.
Kim
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.