Can anyone tell me how to construct an sql insert statement that includes a variable? Please? Thanks!
Vb/SQL
Collapse
X
-
Originally posted by RioDogCan anyone tell me how to construct an sql insert statement that includes a variable? Please? Thanks!
Hi RioDog,
if your inserting a string then use
sSql = "INSERT INTO tablename (fieldname) values(" & chr$(34) & sString & chr$(34) & ");"
dbconn.Execute sSql
if your inserting a number then use
sSql = "INSERT INTO tablename (fieldname) values(" & iInteger ");"
dbconn.Execute sSql
hope this helps :)
Comment