Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass-Through On SQL Server, Update On Memo Field
Message
From
05/11/1998 10:58:26
Roberto Cysne
Banco do Nordeste S.A.
Fortaleza, Brazil
 
 
To
05/11/1998 10:17:22
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00154819
Message ID:
00154842
Views:
18
Darren,

Try to invert quotation marks and double quotation marks.

SELECT References_main
SCAN
lcSql = ‘UPDATE Referenc Set rf_ordr = “’;
+ ALLTRIM(References_main.rf_ordr) + ‘”,’;
+ ‘rf_para = “’ + ALLTRIM(References_main.rf_ordr) + ‘”,’;
+ ‘rf_Title = “’ + ALLTRIM(References_main.rf_Title) + ‘”,’;

* Below is a memo field

+ “rf_text = ‘” + REFERENCES_MAIN.rf_text + “’”;
+ ‘ WHERE rf_num = ‘ + ALLTRIM(STR(references_main.rf_num))

lnTest = SQLPREPARE(THIS.ln130Checklist,lcSql)
ENDSCAN


>I am doing a update sqlexec command in my system and i am haveing trouble with my update command because some of my memo fields have ' marks in it, which makes my sql server error out before it gets to the end of my sql command. Does sql passthrough on sql server require the ' marks around all char field or is their another way I can insert this directly into a sql server text field.
>
>Example:
>SELECT References_main
>SCAN
>lcSql = "UPDATE Referenc Set rf_ordr = '";
> + ALLTRIM(References_main.rf_ordr) + "',";
> + "rf_para = '" + ALLTRIM(References_main.rf_ordr) + "',";
> + "rf_Title = '" + ALLTRIM(References_main.rf_Title) + "',";
>
> * Below is a memo field
>
> + 'rf_text = "' + REFERENCES_MAIN.rf_text + '"';
> + " WHERE rf_num = " + ALLTRIM(STR(references_main.rf_num))
>
> lnTest = SQLPREPARE(THIS.ln130Checklist,lcSql)
>ENDSCAN
Roberto Cysne Costa
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform