Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problems with the ' symbol..

Reply
Thread Tools

Problems with the ' symbol..

 
 
Graham Mattingley
Guest
Posts: n/a
 
      08-11-2003
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving the web, charset problems and symbols problems Sak Na rede Ruby 0 01-30-2009 05:05 AM
Problems, problems for newbie Shelly ASP .Net 1 09-03-2007 02:10 AM
Problems compiling simple C++ code (also problems with std::string) Susan Baker C++ 2 06-26-2005 01:43 AM
Re: sound problems and modem problems Harold Potter Computer Support 5 12-04-2003 04:12 PM



Advertisments