Data.Win.ADODB.TCustomADODataSet.CancelBatch

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CancelBatch(AffectRecords: TAffectRecords = arAll);

C++

void __fastcall CancelBatch(TAffectRecords AffectRecords = (TAffectRecords)(0x2));

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB TCustomADODataSet

Description

Cancels a pending batch update.

Call CancelBatch to cancel any pending updates in a dataset that has been opened in batch update mode. CancelBatch may be called without error when there are no pending updates, but this has no effect.

CancelBatch is not applicable to datasets in immediate update mode. Calling CancelBatch for such datasets without the arCurrent constant raises an exception.

The default AffectsRecords parameter value is arAll.

The AffectRecords parameter may be any one of the following TAffectRecords values:



Option Meaning

arCurrent

Only the updates for the current row are applied.

arFiltered

Only updates for rows matching the current filter are applied.

arAll

Updates for all rows are applied.

arAllChapters

Update affects all chapters (ADO chapters)

Note: To use batch updating, the CursorType property of the dataset component must be either ctKeySet (the default) or ctStatic and the LockType property must be ltBatchOptimistic.

See Also