Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to store a VFP object in a table?
Message
De
04/12/2007 08:02:26
 
 
À
03/12/2007 16:52:14
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01272898
Message ID:
01273019
Vues:
23
Hi Mike.

>I've got to admit, Save to and Restore from are "ancient" and I've not used those commands for ages. Thanks for the code sample. I can make that work for me.

I used to use a similar approach but have since changed to using XML. The biggest reason is that the SAVE format is binary and more likely to suffer corruption (in my experience, anyway). Also, if you want to edit it in place (ie. right in the memo field using a BROWSE) for some reason, that's easily done with the XML.

You can use code very similar to Christof's but instead of saving the property values to individual variables, build an XML string instead with each element having the name of the property. To restore the object, go through the XML and set the properties accordingly.

Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform