Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Single Quote Problem
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00715663
Message ID:
00715785
Views:
10
>I have a SQL table field which is used as a memo field. It is filled with appostrophies and single quotes. Using VFP, the user is add/updating the field in a VFP memo field. I then am doing a UPDATE function to SQL, but because of the single quotes, SQL barks. I can't use double quotes either to wrap my memo field text in because sql doesn't like that.
>
>Any ideas?

Try using a variable to hold the string value with quotes, for example:
nConn = sqlstringconnect("DRIVER=sql server;SERVER=(local);UID=sa;PWD=;DATABASE=northwind")
myvar="he's coding"
? sqlexec(nConn,"update products set productname=?myvar where productid=1")
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform