Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem to use apostrophe in a text string when using UP
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00654499
Message ID:
00655339
Views:
27
You can use AERROR() function to get ODBC error message. Meanwhile, you can try to build whole update SQL string.
lcUpdateString = [UPDATE BEST SET ] + lprFieldName + [ = '] + [lprFieldValue] + [']  + ; 
  [ WHERE BESTNR=] + Transform(nBestnr)
>Sergey,
>
>I can not get it work as you proposed, maybe because I do not understand how to include the last part of my update command: "WHERE BESTNR=?nBestnr". "BESTNR" is the name of one SQL table field (number) and "nBestnr" is my number parameter. I tried this:
>
>lcUpdateString = [UPDATE BEST SET ] + lprFieldName + [ = '] + [lprFieldValue] + [']+ ' WHERE BESTNR=?nBestnr'
>
>When I look at the value of lcUpdateString in the debugger WATCH window it looks OK, but nUpdate=SQLEXEC(nCon,lcUpdateString) returns -1
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform