Greetings, I've created a report builder app, SQL 2000/ASP.
One of the features is that the user can save the query they build. The text of the query is saved to a separate SQL table. The problem I'm having is saving this text. I've done everything I know to handle the apostrophes. Here's an example:
Here's my code to save it:
If I response.write the queryvalue, it looks file. But it saves it like this:
so when it runs again, there's an error. Any ideas would be greatly appreciated. Thanks.
One of the features is that the user can save the query they build. The text of the query is saved to a separate SQL table. The problem I'm having is saving this text. I've done everything I know to handle the apostrophes. Here's an example:
Code:
SQL="select * from equipment where assetid >''"
Code:
if request.form("query")>"" then
queryname=request.form("queryname")
queryvalue=request.form("queryvalue")
objConn.execute("insert into rptQueries (queryname,queryvalue) values('" & queryname & "','" & queryvalue & "')")
end if
Code:
select * from equipment where assetid='