RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TField.ImportedConstraint Property

Represents an SQL clause that enforces constraints stored on the server.

Pascal
property ImportedConstraint: string;
C++
__property AnsiString ImportedConstraint;

Read ImportedConstraint to determine the limits imposed by the server on what values are valid for the field. ImportedConstraint is an SQL search expression such as

Value > 0 and Value < 100

Do not change the value of ImportedConstraint. To add additional constraints on the field value, use the CustomConstraint property instead. Custom constraints are imposed in addition to the imported constraints. If the server constraints change, the value of ImportedConstraint will be changed but constraints introduced in the CustomConstraint property will persist. 

Removing constraints from the ImportedConstraint property will not change the validity of field values that violate those constraints. Removing constraints results in the constraints being checked by the server instead of locally. When constraints are checked locally, the error message supplied as the ConstraintErrorMessage property is displayed when violations are posted, instead of an error message from the server when updates are applied.

Note: On Windows, ImportedConstraint is only set for fields of datasets that import constraints. These include client datasets (when they receive imported constraints in data packets) and BDE-based datasets.
Note: On Linux, the IDE does not provide any mechanism for importing server constraints. However, client datasets can receive imported constraints in data packets from an application server running on another platform.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!