Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary private data session
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Temporary private data session
Miscellaneous
Thread ID:
00343415
Message ID:
00343415
Views:
60
I'm looking to get some opinions to maybe prevent some headaches down the road.

I have an object that is already running under a private datasession form object. I'm trying to use some temp cursors to build a hierarchical object based off some XML DTD files. What I'd like to do is for the lifetime of a certain method put the object into it's own datasession so it can freely create cursors that are only used for SCATTER NAME purposes to build the object. I don't want to have to worry about cursor name conflicts between the tables/views/cursors currently in use and the element names of the DTD.

If I instantiate a Session object in a method, will it put the method into a new private ds that will disappear when the session object goes out of scope? For example:

loSession = createobject( "session" )
create cursor TheRootElement ( ... )
scatter name this.TheRootElement
create cursor ASubordinateElement ( ... )
scatter name this.TheRootElement.ASubordinateElement
loSession = .null. && poof all the cursors and return to the priv ds

TIA
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Next
Reply
Map
View

Click here to load this message in the networking platform