M
musosdev
Hi
I'm trying to code up an admin system for my website. A couple of the
welcome text paragraphs are stored in an SQL database, so that we can update
them should we need to. However, even though I'm using the HTMLEncode method
(I've also tried the URLEncode method), the apostrophe always remains, and
then when I try and do the update query, I get...
Unclosed quotation mark after the character string
The SQL is UPDATE StaticPages SET Text = 'blah' WHERE PageID = 'ABOUT'
The code only breaks when the Text variable contains an apostrophe. But, I'm
using an encoding method? Why is the apostrophe not being encoded?
Thanks,
Dan
I'm trying to code up an admin system for my website. A couple of the
welcome text paragraphs are stored in an SQL database, so that we can update
them should we need to. However, even though I'm using the HTMLEncode method
(I've also tried the URLEncode method), the apostrophe always remains, and
then when I try and do the update query, I get...
Unclosed quotation mark after the character string
The SQL is UPDATE StaticPages SET Text = 'blah' WHERE PageID = 'ABOUT'
The code only breaks when the Text variable contains an apostrophe. But, I'm
using an encoding method? Why is the apostrophe not being encoded?
Thanks,
Dan