Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating SQL Fields with single quotes
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00715642
Message ID:
00715662
Views:
17
You mean a string something like:

lcString = "Our members include O'Malley, O'Hara, O'Neil and O'Sullivan"

I created a table named Test with a Descript column. The following works for me:

? SQLEXEC(lnHandle, [update test set descript = '] + STRTRAN(lcString, "'", "''") +['])



>Got ya... But wonder if you wanted to update the field with "O'Malley"? How could you do that? I have long memo fields in SQL that tons of approstrophies and single quotes. I'm bring them into VFP with SQL Select, and want the user to update in an edit field, press , and then I do a SQL UPDATE fuction.
>
>thanks....
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform