Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excluding memo
Message
De
07/03/2005 00:07:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00993163
Message ID:
00993196
Vues:
23
This message has been marked as the solution to the initial question of the thread.
Rajani,

>I am using "Cursortoxml" function to export dbf data to xml.
>am wondering is there any quick way to exclude memo fields while exporting

Two possibilities:

1) Use SQL Select to select just the fields you want into a cursor, then do CURSORTOXML against the cursor instead of against the DBF. Of course, this may be slower if you have lots of records.

2) Limit the fields visible on the selected DBF by issuing this command:
SET FIELDS TO fieldname1, fieldname2
By leaving out the memo fields in the list of fields in SET FIELDS TO, your CURSORTOXML will output just the fields in the list and may be faster than SQL SELECT of just those fields. (Remember to SET FIELDS TO afterwards to restore visibility of all fields if you need to do anything further with that open DBF). SET FIELDS TO is sort of like a filter on a DBF, except that it filters fields instead of records. It also handles skeletons, as in:
SET FIELDS TO ALL LIKE skeleton
SET FIELDS TO ALL EXCEPT skeleton
which might be helpful if all your memo fields are named in a way that a skeleton could apply to them and not to other fields. For example, if I had fields test, testnum and testmemo I could eliminate the memo with
SET FIELDS TO ALL EXCEPT *memo
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform