General information
Title:
Private data-session SETtings
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only