Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get DBC to fire field rule manually
Message
 
To
05/06/2003 22:27:17
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00796071
Message ID:
00797051
Views:
14
Hi Hilmar, thanks for taking interest in this thread.

>
>Perhaps you will benefit from a table-based validation: rules are defined in a table, a special function searches through all rules for the table.

Actually I have a table nViewFldDefaultsValids.dbf, which contains these validations. Thanks to Cetin, who suggested that I load these defaults & validation from this table into the DBC using DBSetProp(). Due to this I will be able to customize the defaults and they take effect without any special efforts.

As for validations, they fired at the time of tableupdate() and when this fails
>
>Field-level and record-level rules have the bad habit to fire too early.

I am not in control due to framework and as it has a tablerevert in it the users looses the data-entry.

These validation, right now, I use DBGetProp() to get them back from the DBC and have put them in the valid() of the controls.

I wanted something like best of both the worlds, fire quite early automatically and in my controllable postion, so the users can do the necessary and before being submitted, thus only clean data is tableupdated()

>
>With table-based validation, you could check the rules before doing your TableUpdate(). As an additional security, you could call your validation function from the Insert and Update triggers.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform