Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom object data session?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00710978
Message ID:
00710996
Vues:
16
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform