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