Defining a check constraint definition
Print
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Defining a check constraint definition
A check constraint definition is a server-side validation. The following steps demonstrate how to define a check constraint definition.
To define a check constraint definition:
- Start Data Administration and connect to the OpenEdge database you are migrating.
-
Select DataServer > MS SQL Server Utilities > Server Attributes > View/Maintain Foreign Constraints.
The View/Maintain Foreign Constraint Definitions dialog box appears.
-
Select the table for which you are defining a check constraint
definition and click Create Constraints.
The Create Foreign Constraint Definitions for tablename dialog box appears, as shown in figure below.
-
Select CHECK from Constraint
Type.
The Create Foreign Constraint Definitions for tablename for a dialog box, appears as shown in the following figure.
Figure 1. Create Foreign Constraint Definitions for tablename dialog box for check constraint definitions 
- Accept the default check constraint definition name, or enter a new one.
- Select a field from the Field list.
- By default, the check constraint definition has the Active check box selected. Leave this box selected if you want the constraint definition you are defining to be available for migration.
-
Enter an expression for server-side validation in the Constraint
Expression field.
CAUTION: The expressions entered are not checked for correct syntax. If the expression is not valid on the server, the check constraint definition is rejected when building check constraint definition objects on the server.
-
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, 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.
- Optionally, add a description of the constraint definition in the Expression Description box.
- 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 and to define more constraint definitions for the selected table.