asp and SQL syntax: variables : 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!


-- Anonymous, May 24, 2000



You need to concatenate the literals and variable strings to build the SQL statement string.

Hope this helps,


-- Anonymous, May 25, 2000

Moderation questions? read the FAQ