Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Private data-session SETtings
Message
De
12/03/2003 12:43:09
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Private data-session SETtings
Divers
Thread ID:
00764970
Message ID:
00764970
Vues:
65
I want to modify my VFP application framework so that for every form with a private datasession (PDS) I don't have to keep repeating a call to all the SET (SET DATE BRITISH, SET TALK OFF, etc.) commands which are scoped to the current datasession.

At present I call a procedure PrivDataSet() in every form with a PDS (ie. most of them), but this means having to explicitly place the call in the BeforeOpenTables() event of the data environment. Unfortunately I cannot place the code once-only in my 'base form' parent class, because the DE (hence BeforeOptionTables()) is not available in a .vcx-based form subclass. The framework must work in VFP6 and 7, so unfortunately I cannot use the dataenvironment class that is new to VFP8.

At first sight, the baseform.load() event would be an ideal place for the DS-specific SETtings, but some commands (eg. SET EXCLUSIVE) have to be set before the tables are opened, ie. before the load event fires.

How can I get around this problem and have true inheritance with my PDS-limited SETtings?

I would be interested to hear how other developers get around this problem.

Many thanks,
Alan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform