homepage Welcome to WebmasterWorld Guest from 54.205.241.107
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
set quoted identifier off in SQL
set quoted identifier off in SQL
pwint

5+ Year Member



 
Msg#: 27 posted 8:56 am on Sep 12, 2005 (gmt 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.

 

mattglet

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 27 posted 11:26 am on Sep 12, 2005 (gmt 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:
[webmasterworld.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved