>>
http://fox.wikis.com/wc.dll?Wiki~DataSession>
>Thank you, Frank.
rule e) of that wiki article is your way out normally.
Eg you have some application object goApp which is started in the public/general datasession 1.
It offers seom method creating a cursor you may need in several places, eg a list of users. You'd need this cursor to be created in the private datasesson you call from, then add a method setDatasession to your
App class, simply:
LPARAMETERS tnSession
SET DATASESSION TO tnSession
In the calling session do goApp.setdatasession(SET('DATASESSION')) before making the call creating a cursor and you're done.
You may also want a resetdatasession() method, which resets an object to the datasession it was created, then simply store SET('DATASESSION') to some property in the init() event.
Be cautious, I'd never change a form's session, that causes problems with bound controls, I'd just recommend that for classes tht act as some kind of library of methods you need in many places.
You could also make use of functions, that always work in the same datasession as their caller.
Bye, Olaf.