Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class keeps changing DataSession
Message
De
01/08/2002 14:22:59
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
01/08/2002 13:47:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00684772
Message ID:
00685135
Vues:
27
Hi Bill,
I advocate never relying on SET DATASESSION TO x in code. Debugging yes, but not for production. Each object wants to work in the datasession it was created in. It knows that environment, somehow, and knows to set it when one of its methods is called. I'm sure there are folks who use SET DATASESSION TO effectively, but it seems to go against the power of the fox. You call a object's method, and the right datasession is selected automatically.
In an OOP sense, you are operating on data you have no right to. The cursors in a datasession are essentially private to that DS. When a developer changes the DS, he is accessing a cursor as if it is public.
If you think though the logic of your problem, is there a way to allow the code that manipulates the data to be created in the same DS? Or perhaps pass the data to the other DS in an array?
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform