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 11:59:35
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:
01273078
Views:
23
>Hi Mike,
>
>>Does anyone know if it is possible to store an object (based on the empty class) into a table or cursor? If so what field type? If not, any suggestions?
>
>if the object is not based on empty and doesn't have property arrays and you don't care about the loss of precision for numeric values and none of the parent classes is in a PRG file, you can also just call the SaveAsClass method to save the current state of an object into a VCX. If you need to move this into a single memo field, you can use CURSORTOXML() to convert the VCX into XML, or use FILETOSTR() if you can store the VCX and VCX file in separate fields.
>
>It's probably the slowest method as far as saving is concerned, but might be the fastest one to restore if you just keep the VCX file on disk.

I was eager to try this until I realized that it cannot work since my object is based on the empty class.
Previous
Reply
Map
View

Click here to load this message in the networking platform