>I made an object that goes and fetches some data. The problem is that the object isn't using my form's datasession, even though it's being called from there. It insists on reverting to the default session. How do I force it to use the form's datasession? A data gathering object does me no good if I can't see the data it gathers. :(
>
>Thanks,
>
>Michelle
Hi Michelle
For the object to share the form's datasession, it must be created by the form, i.e. on the Load or Init methods. And of course, it should not inherit from the
session base class.
If it is a global object (created within the DEFAULT data session) it will remain that way no matter who's using it.
BTW, do NOT try to switch datasessions with SET DATASESSION TO... it is explicitly documented as "for debugging purposes only" and it is not reliable.
Regards
Jose.