Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom object data session?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00710978
Message ID:
00710996
Views:
15
>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.
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform