October 4, 2005 at 9:03 pm
Can somebody teach me how to configure the SQL server , so it will allow to accept a single quote in my string variable.
I declare the datatype as nvarchar.
October 4, 2005 at 10:09 pm
If you have to have the single quote stored in the database then you need to put it in twice.
EG: don't becomes don''t
You could also play around with SET QUOTED_IDENTIFIER, but I've generally found that to be more trouble than it's worth. Take a look at the topic in Books Online, there are a couple of relevant examples there.
--------------------
Colt 45 - the original point and click interface
October 5, 2005 at 12:11 am
Did somebody know where to put SET QUOTED_OFF in MS SQL server . Put in asp.net code or in MS SQL query
October 6, 2005 at 7:56 am
As suggested, don't use that. Why aren't you using stored procs to do this work? It would avoid the problem altogether.
October 7, 2005 at 12:31 am
Let's add this to the ever-growing list of "Reasons why dynamic SQL is evil"
October 7, 2005 at 6:31 am
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply