Posted By: mag CustomConstraint - 09/09/99 12:14 AM
How can i use the propertie CustomConstraint of the object TField ?

I specified the condition, but it was not checked.

------------------
Marcelo Augusto Giovenardi
mag@mag.eti.br
www.mag.eti.br
MAG - Consultoria e Desenvolvimento
Vit
Posted By: Dave Re: CustomConstraint - 09/09/99 09:28 PM
What syntax did you use for the expression?
Posted By: Marco Kalter Re: CustomConstraint - 09/13/99 10:30 PM
The TField's CustomConstraint property is ignored by the TOracleDataSet. If you feel that we should support it, let us know in this thread.

There are of course many other ways to validate field values. The most obvious way is by using primary key, unique key, foreign key and check constraints in the database. A TOracleDataSet will automatically pick up database constraints if you set its EnforceConstraints property to True. Error messages can be defined in the database as well, and the TOracleSession.MessageTable property defines the table from which these messages are retrieved. This way you can add constraints and error messages in the database without modifying your application.

Other ways to validate field values are the OnValidate event and the MinValue, MaxValue and EditMask properties.

------------------
Marco Kalter
Allround Automations
© Allround Automations forums