Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datasessions
Message
De
22/03/2007 13:00:36
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01206843
Message ID:
01207173
Vues:
29
>I don't agree with Ed as well, but I'm not good in discussions and also have a fear of being called an "offender" <g>
>
>>Ed,
>>
>>>I see you already received all answers, i.e. basically you can have as many datasessions as you want but you better control each switch explicitly in code, i.e. using SET DATASESSION TO every time you really want to do it.
>>
>>I don't agree that you need to issue SET DATASESSION TO whatever number explicitly in every case.
>>
>>For example, if you wrap up some old code inside methods of a class based on Session, you instantiate the class and call the methods without worrying about changing the datasession explicitly. As long as your class is well-encapsulated and doesn't depend on any state of databases or tables outside of itself, you don't need to explicitly set anything.

Reading the foxhelp, it looks like SET DATASESSION TO will receive (accept) a value of 1 or 2 corresponding to the default or a form's private datasession. Thus I would conclude that in code there are only 2 datasessions available unless we are also switching between form objects. Would that be right?

Regarding the debate, If there are multiple forms open with each using the same tables but in different relation configurations, this would be a good time to use a PRIVATE datasession for each form, so actions and record movement in one form doesn't mess up the state in the other forms.

- Don
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform