Replacing quotation marks

J

J. Muenchbourg

The following removes any unwanted apostrophes before being inserted
into an sql database:

Articletext = replace(articleText,"'","''")

..but if I need to remove all quotation marks, this doesnt work:

Articletext = replace(articleText,""","''")


????
Muench
 
J

John Beschler

"" = empty string
""" = empty string + extra "

To place a " into a string use "".

Your code would then be:
Articletext = replace(articleText,"""","''")
or alternately:
Articletext = replace(articleText,CHR(34),"''")

HTH,
John
 
A

Alan

You need to double-up apostrophes to stop them interfering with the
delimiters needed around textual column contents - why do you need to
double-up quotes?

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top