Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private datasession issues..
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00153491
Message ID:
00153895
Views:
26
Michiel,

Changing data sessions can be a dangerous thing to do if you do not restore the data session properly. A better design might be to build your Methods class to be a light weight object and then in your form class put one them in the form. Then make your calls THISFORM.oMethods.SetSets().

This way the methods object is in the same data session as the form.

Another alternative is to make your class a subclass of Form and give your oMethods class a MyDataSession property, then code the SetSets method like this;
* oMethod.SetSets
LPARAMETERS pnDataSession
THIS.MyDataSession = THIS.DataSessionId
SET DATASESSION TO pnDataSession

* Do your SET Commands

* Then ...
SET DATASESSION TO THIS.MyDatasession

RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform