Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to store a VFP object in a table?
Message
From
04/12/2007 08:02:26
 
 
To
03/12/2007 16:52:14
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01272898
Message ID:
01273019
Views:
26
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform