AnyDAC
ContentsIndexHome
PreviousUpNext
TADDataSet.EnableConstraints Method

Reenables enforcement of the client constraints when records are posted.

Group
Links

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.

procedure EnableConstraints;
ADQuery1.DisableConstraints;
try
  // perform updates here, without checking client constraints
finally
  ADQuery1.EnableConstraints;
end;
What do you think about this topic? Send feedback!