Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Escape sequences for SQL string
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00800907
Message ID:
00801158
Views:
24
>You don't need to do anything about it. As long as the entire string is wrapped within single quotes. I tried a few permutations through query analyzer and it seems to be working.
>
>
>>>For single quote, you don't need to use escape sequence. Just replace one single quote with two single quotes (not double quote). For example,
>>>
>>
>>Great, that seems to take care of single quotes. What about double quotes? How should they be handled? I tried (and a few variations on this):
>>
>>
>>strnewLine = strLine.Replace("\"", @"\" + '"');
>>
>>
>>But, SQL chokes.

Wow, talk about me over complicating things. That worked fine <g>. Thanks, I appreciate it.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform