Datasnap.DBClient.TCustomClientDataSet.DisableConstraints

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
Datasnap.DBClient.pas
Datasnap.DBClient.hpp
Unit: Datasnap.DBClient
Parent: TCustomClientDataSet

Delphi

procedure DisableConstraints;

C++

void __fastcall DisableConstraints();

Description

Disables the enforcement of constraints.

Call DisableConstraints to prevent, on a temporary basis, enforcement of constraints that have been assigned to the dataset or its fields. For example, when an application iterates through a client dataset, it may improve performance to disable constraints temporarily.

Note: Calling DisableConstraints increments a reference count. 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.

See Also