Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PropertyBags
Message
From
21/06/2001 07:03:56
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00520597
Message ID:
00521806
Views:
19
No, Actually it's more than that.
The thing is you can persist these objects to files on disk or in the database
then depersist them and read the properties from them...

I made the Active X DLL that will enable you to use these which I can post if anyone has interest.. The code looks like:

I think their cool because there is far less overhead then passing recordsets
around...
***Create a PropertyBag..
oPB=CREATEOBJECT("VBPB.VBPropertyBag")

Write Properties to the PropertyBag
oPB.WriteProperty("Prop1","test")
oPB.WriteProperty("Prop2",1234)
oPB.WriteProperty("Prop3",DATE())


Write Properties to the PropertyBag
?oPB.ReadProperty("Prop1")
?oPB.ReadProperty("Prop2")
?oPB.ReadProperty("Prop3")

At this point we can pass the object around between functions in the current app.

Persist to disk....
?oPB.Persist("c:\temp\opb.pb")

**At this point we can load the file into a database or pass it across the **network to another component
**or application can read the values...

**Release the object and shutdown the application
opb release

**open a new application and open the persisted PropertyBag
oPB=CREATEOBJECT("VBPB.VBPropertyBag")
oPB.DePersist("c:\temp\opb.pb")
**As you can see the property values are still here
?oPB.ReadProperty("Prop1")
?oPB.ReadProperty("Prop2")
?oPB.ReadProperty("Prop3")
Cool, huh, I think so..
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform