Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting ampersand into SQL server.
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00465221
Message ID:
00465228
Vues:
13
>Hi all,
> I need to insert Single Quote, Ampersand and some other symbols/characters into SQL table. What to do in order to escape these characters? And where can I find a list that contains the characters that need to be escaped? TIA.
>
>Wan

Wan,
Using SQL Pass-thru you can use the T-SQL function CHAR() to insert these characters.
lcsqlexec = [insert into mytable (field1, field2) values (char(39),char(38))]
=sqlexec(lnconn, lcsqlexec) && inserts single quote in field1 and ampersand in field2
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform