Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Let me re-formulate my question and post my solutions so far, since I've learned a bit since I originally posted it:
>
>Question:
>How do I force all my private data sessions to share a common set of settings (ANSI, ...)?
>
>
>Answer:
>The best way that I know of so far is to put a call in the base form's Load method. The disadvantage seems to be that if I do not have NODATAONLOAD set, then the data I pull for a view might not be what I'm expecting.
>
>What I'd like to do is to subclass the DE, override the BeforeOpenTables event and put the code in there.
>
>Bob
Another way is to have two environment type objects. One object is global and has the settings for all the VFP set commands. The other would be scoped to your form and part of your form base class. When this object instantiated it would gather the private settings (the subset that is affected by a private data session) from the global class and reissue the set statements. The form object uses the global object to determine values, or it can have the global values overriden.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement