Print Thread
CustomConstraint
#44 09/09/99 12:14 AM
Joined: Sep 1999
Posts: 1
Vit
M
mag Offline OP
Member
OP Offline
Member
M
Joined: Sep 1999
Posts: 1
Vit
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


Marcelo Augusto Giovenardi
mag@mag.eti.br
www.mag.eti.br
MAG - Consultoria e Desenvolvimento
Vit
Re: CustomConstraint
#45 09/09/99 09:28 PM
Joined: Sep 1999
Posts: 4
Las Vegas, NV USA
D
Member
Offline
Member
D
Joined: Sep 1999
Posts: 4
Las Vegas, NV USA
What syntax did you use for the expression?


Dave Skowron
Re: CustomConstraint
#46 09/13/99 10:30 PM
Joined: Aug 1999
Posts: 22,214
Member
Offline
Member
Joined: Aug 1999
Posts: 22,214
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


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 14 (0.007s) Memory: 2.5024 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-10 03:31:54 UTC
Valid HTML 5 and Valid CSS