Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quoting technique
Message
From
11/03/1998 11:10:58
 
 
To
11/03/1998 10:55:55
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00083892
Message ID:
00083901
Views:
23
>Using SQL Server, I am preparing the update line in a string and then using that string to update some fields for the record. I am using the single quote to encapsulate the value. However, sometimes, I can have a single quote in the value. So, I decided to do something like this: ... SET FIELD1='First part'+CHR(39)+'second part'...
>
>However, SQL Server does not understand CHR().

Whenever a single quote occurs in the string , stuff it with another single quote.

******* here is the code

xxx = " This is my sample ' quote "
xxx = strtran(xxx,"'","''")
dynqry = "Update mytable set field1 = " + xxx
?sqlexec(Gnconnhandle,dynqry,'MyCursor')
return
Previous
Reply
Map
View

Click here to load this message in the networking platform