Try OpenEdge Now
skip to main content
DataServer for Oracle
The DataServer Tutorial : Managing server attributes : Defining constraint definitions in Data Administration : Defining a check constraint definition
 
Defining a check constraint definition
A check constraint definition is a server-side validation. The following procedure describes how to define a check constraint definition.
To define a check constraint definition:
1. Start Data Administration and connect to the OpenEdge database you are migrating.
2. Select DataServer > ORACLE Utilities > Server Attributes > View/Maintain Foreign Constraints. The View/Maintain Foreign Constraint Definition dialog box appears.
3. Select the table for which you are defining a check constraint definition and click Create Constraints. The Create Foreign Constraint Definition for tablename dialog box appears, as shown in figure above.
4. Select CHECK from Constraint Type. The appearance of the Create Foreign Constraint Definition for tablename dialog box, appears as shown in the following figure .
Figure 18. Create Foreign Constraint Definition for Customer dialog box for check constraint definitions
5. Accept the default check constraint definition name, or enter a new one.
6. Select a field from the Field list.
7. By default, the check constraint definition has the Active check box checked. Leave this box checked if you want the constraint definition you are defining to be available for migration.
8. Enter an expression for server-side validation in the Constraint Expression field.
Caution: The expressions entered for are not checked for correct syntax. If the expression is not valid on the server, the check constraint definition is rejected when building server check constraint definition objects on the server.
9. A validation expression is a client-side validation check that conforms to OpenEdge syntax requirements and only takes place during interactive screen I/O. This is in contrast to a check constraint definition which is tied to the actual database column, not the screen dialog.
Caution: The validation expression is a read-only value for reference. Use the Field Properties dialog box of the Data Dictionary to maintain validation expressions.
10. Optionally, add a description of the constraint definition in the Expression Description box.
11. Click OK to save the constraint definition and exit the dialog box. Click Create to save the constraint definition and remain in the dialog box to define more constraint definitions for the selected table.