Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting ampersand into SQL server.
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00465221
Message ID:
00465228
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform