storing class data? 
Author Message
 storing class data?

Does anyone out there know if there's a way to store the contents of a VB
Class on disk?  My app has classes that contain data that I'd like to
preserve and load again next time the app runs.  I cannot store the contents
of the class in an Access database and it appears that the Put statement can
write user defined types to disk, but not classes.  How does one store the
contents of a class?

Any comments appreciated.

Bruce Hamilton



Mon, 23 Apr 2001 03:00:00 GMT  
 storing class data?

Quote:

>Does anyone out there know if there's a way to store the contents of a VB
>Class on disk?  My app has classes that contain data that I'd like to
>preserve and load again next time the app runs.  I cannot store the
contents
>of the class in an Access database and it appears that the Put statement
can
>write user defined types to disk, but not classes.  How does one store the
>contents of a class?

No intrinsic way to do this.  You have the class write all of the necessary
items to (a disk file | the registry | a database | other) when closing and
read the info back when it starts next time.  Depending on the need, you can
do it in the Initialize and Terminate events of the class or add
Save/Restore methods to the class that can be invoked with any necessary
parameters.


Mon, 23 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. store data from classes in a file like database

2. help with Data-Aware classes and Data Forms

3. data binding objects/ data classes etc

4. Data Source Class to access Data Environment

5. Help: Data-aware class and data report

6. Help: Data-aware class and data report

7. data class vs datacontrol vs data environemt

8. Creating a control class that can be a data binding data source

9. Help: Data-aware class and data report

10. Help: Data-aware class and data report

11. Update: Utility to create VB Class Files and Stored Procedures

12. Storing Classes in the "Session" Object

 

 
Powered by phpBB® Forum Software