RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomADODataSet.CancelBatch Method

Cancels a pending batch update.

Pascal
procedure CancelBatch(AffectRecords: TAffectRecords = arAll);
C++
__fastcall CancelBatch(TAffectRecords AffectRecords = arAll);

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.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!