CancelBatch Method (Remote Data)

       

Cancels all uncommitted changes in the local cursor (used in batch mode).

Syntax

object.CancelBatch (SingleRow)

The CancelBatch method syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
SingleRow A Boolean value that is True if the cancel action is done only for the current row, or False if the cancel action applies to all rows in the batch. Default is False.

Remarks

The CancelBatch method cancels all uncommitted changes in the local cursor, and reverts the data back to the state it was when originally fetched from the database. Note that this method does not refresh the data by re-querying the server like the Refresh method does — instead it just discards changes made in the local cursor that have not already been sent in a batch update operation.

When you use the CancelUpdate method, only the current row’s changes are rolled back to the state prior to execution of the last Update method.

Batch updates are used whenever you open a connection using the Client Batch cursor library (rdUseClientBatch). In this case, each time you use the Update or UpdateRow methods, the local rdoResultset is updated, but the base database tables are not changed. The BatchUpdate method is used to update the base database table(s) with any information changed since the rdoResultset was last created or synchronized with the BatchUpdate command.

The BatchUpdate method updates the BatchCollisionRows property to include a bookmark for each row that failed to update – collided with an existing row that has data more current than the rdoResultset object as it existed when first read. The BatchCollisionCount property indicates how many collisions occurred during the batch update process.