Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary private data session
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00343415
Message ID:
00343431
Views:
28
>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

If you are in the VFP default datasession then the Session object will create a private datasession. If you are already in a private datasession, it inherits from it.

I don't think it automatically puts you in the newly created datasession. After the instantiation, you would have to change datasessions (i.e. set datasession to loSession.DatasessionID).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform