G
Graham Mattingley
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
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