Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Question about SQL Statment
Message
 
 
À
03/09/2001 00:38:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00551687
Message ID:
00551692
Vues:
21
Hi!

When memo field is very long, it is bad idea to use it that way. As well as you require proof against the "'" character inside of the memo field - that will cause error. There is very good approach that quite a lof of VFP programmers seems miss at all (gess need a FAQ or article???). VFP allows to pass parameters to SQL Pass-Through requests using "?". This is a feature of ODBC and ODBC driver might not support it, however, in most cases following works:

mproddesc = memo field
=SQLExec(mConn, "update table1 set productdesc = ?mproddesc where productid = 'ABC'")

HTH.

>Dear all,
>
>I have a simple question. When I using Update-SQL statment alone to update a memo field, it work fine. But I change the coding into SQL Pass-Through function, it doesn't work. Sample code shown as below :
>
>Working Code :
>
>mproddesc = memo field
>Update table1 set productdesc = mproddesc where productid = "ABC"
>
>Changed Code :
>
>=SQLExec(mConn, "update table1 set productdesc = '"+mproddesc+"' where productid = 'ABC'")
>
>Is it correct? Anyone can give me some advice... Thank you for your help ...
>
>Best Regards
>
>Justy Chow
>justychow@fvihk.com
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform