Data.DB.TField.ImportedConstraint
Delphi
property ImportedConstraint: string read FImportedConstraint write FImportedConstraint;
C++
__property System::UnicodeString ImportedConstraint = {read=FImportedConstraint, write=FImportedConstraint};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Data.DB.pas Data.DB.hpp |
Data.DB | TField |
Description
Represents an SQL clause that enforces constraints stored on the server.
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).
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.