Show: Delphi C++
Display Preferences

Canceling Batch Updates

From RAD Studio
Jump to: navigation, search

Go Up to Using Command Objects


Cancel pending data changes that have not yet been canceled or applied by calling the CancelBatch method. When you cancel pending batch updates, field values on rows that have been changed revert to the values that existed prior to the last call to CancelBatch or UpdateBatch, if either has been called, or prior to the current pending batch of changes.

Used alone with no parameter, CancelBatch cancels all pending updates. A TAffectRecords value can optionally be passed as the parameter for CancelBatch. If any value except arAll is passed, only a subset of the pending changes are canceled. Passing arAll is the same as passing no parameter at all and causes all pending updates to be canceled. The example below cancels all pending changes:

 ADODataSet1.CancelBatch;
 ADODataSet1->CancelBatch(arAll);

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance