Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Session based class
Message
From
15/04/2005 12:20:56
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01002130
Message ID:
01005178
Views:
26
The datasession is not part of the visual class -- it is part of the object that is being created at run-time, i.e. a FORM. The form contains the datasession and the class is participates in the created datasession.

If you want to have a datasession that is unique to a class that this class would always use, then you will have to create the datasession at the beginning of your application and keep it running (and private -- use a modeless hidden form). At the start of the application, create a global variable or application level property to store a handle to the "class" DataSessionID -- this can be done in the INIT method of the "class" session form. Then in the class you can reference the "class" session via this global session id. If you want to preserve the datasession of subsequent forms, save the form datasession id to a local variable in the form or to a custom property. Then you can switch back and forth between the datasessions.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform