FireDAC.Comp.DataSet.TFDDataSet.EnableConstraints
| [–] Properties | |
|---|---|
| Type: procedure function
| |
| Visibility: public | |
| Source: FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp
| |
| Unit: FireDAC.Comp.DataSet | |
| Parent: TFDDataSet | |
Delphi
procedure EnableConstraints;
C++
void __fastcall EnableConstraints();
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;