Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   Problems with the ' symbol.. (http://www.velocityreviews.com/forums/t789374-problems-with-the-symbol.html)

Graham Mattingley 08-11-2003 11:28 PM

Problems with the ' symbol..
 
Hi All,

I have a database query where it looks like this

strQuery = "UPDATE resource SET TITLE = ' "&request.form("TITLE")&" ' WHERE
ID = '"&request.form("ID")&"';"

the problem is that if the field called title has a ' in the text then the
UPDATE fails, because I have closed the TITLE field early. If I reverse the
" & ' marks then I will have the same problem but the opposite way.....

I thought about doing something with ASP, replace but I still cant get round
the fact that I will have a ' in the UPDATE statement..

Can I do something like REPLACE ' with the CHAR code value and add the code
in the SQL record, and will this display the ' or the code.

Kind Regards

Graham Mattingley





All times are GMT. The time now is 05:07 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.