Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Encapsulating a DataSession in a customer object?
Message
From
16/04/1999 02:31:00
 
 
To
15/04/1999 15:58:02
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00208751
Message ID:
00208881
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform