Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to store objects?
Message
 
 
To
20/02/1998 02:23:18
Roberto Cota Rivas
Quid Estrategia Esencial de México
Monterrey, Mexico
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00080035
Message ID:
00080238
Views:
29
Wouldn't it be nice if VFP supported true object persistence? One trick that I've seen work:

- Use a property array to hold most of the data in your object. It can't hold other object references, just scalar data like strings, numerics, etc.
- To store that data: Do an Acopy(object.array, aTmp)
- Store to a memo field all like aTmp
- To Restore the data to the property array, just go the other way.

aTmp can be a local array, It only exists to serve as a conduit.

This technique will move data to and from disk pretty quickly because the transfer is being handled by very little interpreted code.

However, if you want to search your table based on the values of those stored object properties, you need a more granular approach
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform