Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private datasession issues..
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00153491
Message ID:
00153895
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform