Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maintaining data session state
Message
From
22/09/2002 13:12:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00703118
Message ID:
00703170
Views:
20
>I don't know if this is really what you're looking for, but if you create a private session in the Init method of a class and switch to it in the Init, all methods in the object automatically execute in the specified datasession.

Yes, no problem there.

>If you need to have methods execute in another datasession than the object was created in, you have to pass a parameter to the method and switch to the according session that was passed as a parameter inside the method.

Well, this is not practicable when you have dozens of methods you have to call. Basically, I can't modify an entire framework for each method that need to be called from external so I'll pass a datasession ID.

>I haven't tried what happens, when you make a subclass and you're switching the datasession before the DODEFAULT(). Maybe the parent class method keeps the session. So maybe subclassing and switching the datasession inside the subclass may help. But as I said ... not really sure about this.

We finally dropped that approach. As this is unpractical, we used another approach for the needs we had to fill.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform