Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private data-session SETtings
Message
From
12/03/2003 12:43:09
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Private data-session SETtings
Miscellaneous
Thread ID:
00764970
Message ID:
00764970
Views:
66
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
Next
Reply
Map
View

Click here to load this message in the networking platform