FireDAC.Comp.DataSet.TFDDataSet.EnableConstraints
Delphi
procedure EnableConstraints;
C++
void __fastcall EnableConstraints();
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | TFDDataSet |
Description
Re-enables enforcement of the client constraints when records are posted.
Call EnableConstraints to turn on the client constraints previously disabled by a call to DisableConstraints.
Calling EnableConstraints decrements a reference count. When this reference count is zero, constraints are enabled for the dataset. To prevent accidental disabling of constraints, always follow a call to DisableConstraints with a matching call to EnableConstraints.
Example
FDQuery1.DisableConstraints;
try
// perform updates here, without checking client constraints
finally
FDQuery1.EnableConstraints;
end;