Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running code in a separate session
Message
 
 
À
09/01/2006 12:15:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01084016
Message ID:
01084794
Vues:
8
>>Do you think it's safe go this route? Or better use the other idea of instantiating Session object first and creating my object inside it?
>>
>are equal.
>
>>Also when the object will be destroyed, what would be the current datasession?
>
>Current datasession ? Where ? When ?
>
>It doesn't have sense speak of "current datasesssion",
>because VFP have not a "current datasession";
> every object or an active procedure of a .PRG have one "current datasession"
>
>Then, when a stack exist it is:
>
>- PROGRAM(PROGRAM(-1)-1)'s datasession
>
>
>Then, if you write:
>
>* objectX.destroy
>SET DATASESSION TO ....
>
>you change objectX's datasession only!
>and this doesn't set the "current datasession" after "destroy" is finished

Ok, in other words, calling form or program's DS would not be affected without a need to explicitly switch back. I still think Charlie's idea is a bit safer since it's not dealing with SET DATASESSION command, which has a warning in Help. But since I already implemented my idea, it may be too late.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform