Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Encapsulating a DataSession in a customer object?
Message
De
16/04/1999 02:31:00
 
 
À
15/04/1999 15:58:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00208751
Message ID:
00208881
Vues:
22
Pascal,

I haven't read all the many replies to your question but I think I have just done somthing similiar:

1. In the INIT of your custom object, CREATE a dummy form object which has a private datasession.

DEFINE CLASS frmDummy AS Form
DataSession = 2
PROCEDURE Init
SET TALK OFF
SET DELETED ON
ENDPROC
ENDDEFINE

2. Have a pointer in your custom class to this form

3. Set the datasession to the dummy forms datasession

4. You can now open any tables you require and they will be in a Private data session.

5. Any methods of the custom object you call, will now be run with that data session.

HTH
regards

Ian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform