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:
00343437
Views:
27
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
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform