FireDAC.Comp.DataSet.TFDDataSet.UpdateConstraints

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
Unit: FireDAC.Comp.DataSet
Parent: TFDDataSet

Delphi

procedure UpdateConstraints;

C++

void __fastcall UpdateConstraints();

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