>Hi SQL friends,
>
>I have probably a simple problem I hope someone can explain. The problem is as follows:
>From VFP I send data to different SQL tables without any problem but, how do I do to update a field in a SQL database table if I which to include a apostrophe in my text string. For example: nUpdate=SQLEXEC(nCon,"UPDATE MYSQLTABLE SET &lprFieldName='&lprFieldValue' WHERE FIELDEXAMPLE=?nMynr") works for all text strings but not for lprFieldValue="This is the company’s property”. If the string would be written ="This is the companys property”, there is no problem.
Try to double apostrophes in the string.
lprFieldValue = STRTRAN([This is the company's property], ['], [''])
--sb--