does anyone know the proper syntax to insert variables into an SQL statement? the references i have and the vb help files do not seem to cover this.
Printable View
does anyone know the proper syntax to insert variables into an SQL statement? the references i have and the vb help files do not seem to cover this.
is this in MS Access?
For sample:
"select * from table where numfield = " & number
"select * from table where txtfield = '" & text & "'"
------------------
smalig
[email protected]
smalig.tripod.com
this will be in vb. i attempted to use a select statement very similar to what smalig suggested but things don't seem to be working properly. i've pretty much decided to cry uncle and purchased sql for dummies over the weekend.
smalig's code looks right. You could post your code and we'll take a look....
i actually just figured out the problem. i kept getting a message concerning incompatible data types. after i went off in several different directions, i realized that i was not using quotes. sometimes it's in the details.