FireDAC.Comp.DataSet.TFDDataSet.DisableConstraints

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

Delphi

procedure DisableConstraints;

C++

void __fastcall DisableConstraints();

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
procedure
function
public
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
FireDAC.Comp.DataSet TFDDataSet


Beschreibung

Disables the enforcement of the client constraints.

Use DisableConstraints to turn off an enforcement of the client constraints that are in the Constraints property (record constraints) or are assigned to the dataset fields (field constraints). 

Calling DisableConstraints increments an internal counter. As long as this reference count is greater than zero, constraints are disabled for the dataset. To prevent accidental disabling of constraints, always group a call to DisableConstraints with a call to EnableConstraints.

If the application needs to perform batch updates to the dataset, then consider using the BeginBatch / EndBatch methods.

Example

FDQuery1.DisableConstraints;
try
  // perform updates here, without checking client constraints
finally
  FDQuery1.EnableConstraints;
end;

See Also