Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary private data session
Message
From
09/03/2000 15:23:43
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00343415
Message ID:
00343826
Views:
28
>Mark,
>
>Thanks that does seem to work, I do have to USE to get rid of the cursors otherwise they hang around out in an "unknown" datasession afterwards
>
>>If I understand your question, your method will always remain in the DS that its parent is in. Session is just another object and has no affect on the method that created it. You would need to add another line of code to switch to the DS of loSession when creating the cursors.
>>
>>loSession = createobject( "session" )
>>lnDSID = loSession.DataSessionID
>>lnOldDSID = set('datasession')
>>set datasession to lnDSID

>>create cursor TheRootElement ( ... )
>>scatter name this.TheRootElement
>>create cursor ASubordinateElement ( ... )
>>scatter name this.TheRootElement.ASubordinateElement
>>set datasession to lnOldDSID
>>loSession = .null. && poof all the cursors and return to the priv ds


What mark sent you is what I have observed. If you change the DataSessionID in an object, you had better put it back to where you found it, otherwise you get that "dangling" session.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform