ONE Active Server Pages Product Home Page Developer Site Version


UpdateBatch Method Remarks

Use the UpdateBatch method when modifying a Recordset object in batch update mode to transmit all changes made in a Recordset object to the underlying database.

If the Recordset object supports batch updating, then you can cache multiple changes to one or more records locally until you call the UpdateBatch method. If you are editing the current record or adding a new record when you call the UpdateBatch method, ADO will automatically call the ADO Recordset Object Update Method to save any pending changes to the current record before transmitting the batched changes to the provider.

Note icon Note You should use batch updating only with either a keyset or static cursor.

If the attempt to transmit changes fails because of a conflict with the underlying data (for example, a record has already been deleted by another user), the provider returns warnings to the ADO Errors Collection but does not halt program execution. A run-time error occurs only if there are conflicts on all the requested records. Use the ADO Recordset Object Filter Property (adFilterAffectedRecords) and the ADO Recordset Object Status Property to locate records with conflicts.

To cancel all pending batch updates, use the ADO Recordset Object CancelBatch Method.

UpdateBatch Method Example

See the ADO Recordset Object CancelBatch Method example.