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:
1. Start Data Administration and connect to the OpenEdge database you are migrating.
2. Select DataServer > MS SQL Server Utilities > Server Attributes > View/Maintain Foreign Constraints.
The View/Maintain Foreign Constraint Definitions dialog box appears.
3. 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 18.
4. Select CHECK from Constraint Type.
The Create Foreign Constraint Definitions for tablename for a dialog box, appears as shown in the following figure.
Figure 21. Create Foreign Constraint Definitions for tablename 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 selected. Leave this box selected 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 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.
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, 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 and to define more constraint definitions for the selected table.