Groups | Blog | Home
all groups > dotnet ado.net > september 2007 >

dotnet ado.net : Apostrophes



Fred Chateau
9/7/2007 7:09:59 PM
What is the proper way of handling apostrophes in parameter strings for
stored procedures?

--
Regards,

Fred Chateau
fchateauAtComcastDotNet

Roy Harvey
9/7/2007 8:36:46 PM
Replace each single quote character ' the is embedded in the string
with TWO of that character.

SELECT 'O''Hara'

----------
O'Hara

Roy Harvey
Beacon Falls, CT

On Fri, 7 Sep 2007 19:09:59 -0500, "Fred Chateau" <fchateau@127.0.0.1>
[quoted text, click to view]
AddThis Social Bookmark Button