Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Escape sequences for SQL string
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00800907
Message ID:
00801158
Vues:
25
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform