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:
00343461
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
df (was a 10 time MVP)

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

Click here to load this message in the networking platform