Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass-Through On SQL Server, Update On Memo Field
Message
De
05/11/1998 10:58:26
Roberto Cysne
Banco do Nordeste S.A.
Fortaleza, Brésil
 
 
À
05/11/1998 10:17:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00154819
Message ID:
00154842
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform