Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas on solution?
Message
From
30/01/2003 11:08:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Project manager
Title:
Ideas on solution?
Miscellaneous
Thread ID:
00747185
Message ID:
00747185
Views:
48
I'm using VFP 7.0

I've given up trying to find a solution to my problem. Maybe someone else can think of something.

I have a data validation class that I'm trying to automate.
Each table in a DataBase has it's own subclass. Each field in the table has a method. If the method is empty, there is nothing in the field rule, otherwise the rule points at the method.

If I Modify Structure everything works fine.
From dbc_AfterModifyTable(cTableName,lChanged) I run an Update_Table(cTableName) that :
1. creates the subclass for the table.
2. creates all the blank methods.
3. removes all methods for removed fields.
4. alters the table to assign rules to all fields that have a non-empty method.
5. alters the table to drop rules that are now empty.

My problem:
If I modify the subclass for a table, I need to run Update_Table(), but I can't figure out how to have the system do it automatically (ie: when I put code in a previously empty method for a field, I need to go in and assign that method in the field rule).

The only thing I've been able to think of is to assign empty methods to every field, but I REALLY don't want to do this. The class is more complicated than this, and it takes time for the class to find the right method, so I really don't want it spending all the time finding empty methods when I add a new record (particularly on tables with A LOT of fields).

It would be perfect if the projecthook had an AfterModifyFile() method, but it doesn't, only a QueryModifyFile() that executes BEFORE the file is modified.

TIA
Bill Morris
Next
Reply
Map
View

Click here to load this message in the networking platform