|
-
April 24th, 2002, 02:29 AM
#1
Persisting Data in Classes Pls. Help
Hi,
I m creating an ActiveXDll.In that Dll I have one Class for which I have Persistent property = 1.
Now I have got two properties in this class namely
1) UserName.
2) CompanyNo.
Since i have created properties U can set these values.
Now My Question is that suppose I create an object of this class and set the UserName to "ABC".
Now when I create another object of this class I should be able to get the username Setted by another object.
In Short Is there a way in ActiveX Dll's or Classes where I can Share a particular Information Accross various objects of class
without using CONSTANTS because at some or other time i need to update this information
and this updated information should be available accross all objects.
Can U help?
-
April 24th, 2002, 04:04 AM
#2
Re: Persisting Data in Classes Pls. Help
The mechanism of Persisting Data has not to your task of any relation. It is applied only to a concrete instance of a class and is necessary for restoration of the data of this instance after its closing and subsequent re-opening.
Let's assume, that the client creates the your server's object, makes any changes in it and keeps on a disk. Then he can restore the saved data into your server's object. It is possible through this mechanism.
In your case you can only use (for the existing object A and new object B):
set B = new ClassX
B.UserName = A.UserName
Also, you can use the "static" member in Class module OR the global variable in Module. It may solve you problem.
With best wishes,
Vita
With best wishes,
Vita
-----------------------
Russian Software Development Network -- http://www.rsdn.ru
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|