Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

set quoted identifier off in SQL

set quoted identifier off in SQL

8:56 am on Sep 12, 2005 (gmt 0)

New User

10+ Year Member

joined:Apr 25, 2005
votes: 0

I'm trying to insert single code (') into the MS SQL database. But it always show the problem and what i did is i first run the
"set quoted identifier off" command then,
run the SQL statement.
But it still has the problem.
How can i fix this problem? If you have any idea and suggestions , please let me know?
Thanks in advance.
11:26 am on Sept 12, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 12, 2002
votes: 0

You need to escape the quote first. A common method of doing it is by running your string you're trying to insert through a function that replaces all single quotes with 2 single quotes.

Here's a past ASP example of doing so: