asp and SQL syntax: variablesgreenspun.com : LUSENET : SQL Server Database Administration : One Thread |
Hello! I am using asp to interact with an Access database, which uses sql. I have a link on one page to "update.asp?ModRecNum=#", where # is the integer value of the record I want to modify. This part is working correctly.The problem is on my update.asp page, where I am trying to use the ModRecNum variable in my SQL query. Here's what I have currently:
fp_sQry="UPDATE contacts SET FirstName ='::FirstName::' WHERE RecordNum='$ModRecNum'"
This does not work, and neither do several other variations I've tried. Any help is appreciated!
Erin
-- Anonymous, May 24, 2000
Erin,You need to concatenate the literals and variable strings to build the SQL statement string.
Hope this helps,
Eric
-- Anonymous, May 25, 2000