Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 ' character problem

Author  Topic 

cutepraba
Yak Posting Veteran

53 Posts

Posted - 2006-08-12 : 10:35:08
How to overcum the ' character problem

How to insert a ' character in my sql databse

____________
Praba

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-08-12 : 10:43:55
use a second <'> as an escape character.

insert myTable (varcharCol) values ('O''Connell')

Be One with the Optimizer
TG
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2006-08-12 : 14:36:12
Also be sure that your client code is using parameters:

http://weblogs.sqlteam.com/jeffs/archive/2006/07/21/10728.aspx

- Jeff
Go to Top of Page
   

- Advertisement -