How to Define a Transitional Table Constraint

Previous Next

See Also

To define a transitional single-record or multi-record constraint:

1. Double-click Constraints in the Project Catalog or choose Define, Constraints, Table from the menu bar.

The Constraints window appears.

2. If you want to use the OLD() function to refer to the old state of one or more column values:
· Fill out the various fields of the Constraints window. (See the What's This? help for the more details.) To define the type of SQL statement to be built, click on the SQL Definer button, or choose Special, SQL Definer from the menu bar. In the SQL statement, use the OLD() function. For more information, see "SQL Definer".

 

· Click the Check button to have your constraint checked, or choose Special, Check Constraint from the menu bar.
· If the constraint is correct, default transition properties are generated for the constraint, and the Correct flag is checked.
· If you want to restrict or widen constraint evaluation, reset the value for one or more Fire On ... properties.
3. If you want to restrict constraint evaluation to a specific table or to specific manipulation types but not use the OLD() function:
· Click on the Details tab to fill out the various fields of the Constraints window, including the Transition Table, Alias, Fire On Insert, Fire On Delete and Fire on Update fields. (See the What's This? help for more details.)

 

· Click the Check button to have your constraint checked, or choose Special, Check Constraint from the menu bar.
· If the constraint is correct, the Correct field is checked.
4. Save the constraint.

USoft Developer lets you document your constraints by giving them comments or descriptions. For more information, see "How to Comment on a Constraint".

NOTE:

To view Log Information changes, click on the Log Info tab. You can use the What's This? help in the Log Info tab page for more information on each field.