FireDAC.Comp.DataSet.TFDDataSet.UpdateConstraints

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure UpdateConstraints;

C++

void __fastcall UpdateConstraints();

Properties

Type Visibility Source Unit Parent
procedure
function
public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet

Description

Update the changes to the client constraints.

Use the UpdateConstraints method to update the changes to the constraints made after the dataset was activated. 

The client constraints that are in the Constraints property (record constraints) or are assigned to the dataset fields (field constraints) are automatically updated when an Open call is made. The constraint changes for an active dataset are not updated automatically.

Example

with FDQuery1.FieldByName('age') do begin
  CustomConstraint := 'age >= 18';
  ConstraintErrorMessage := 'The age must be greater than or equal to 18 years';
end;
FDQuery1.UpdateConstraints;

See Also