Syntax
| recordsetobject.CancelBatch AffectRecords
| |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Use to cancel a pending batch update.You must be in batch update mode.
The CancelBatch method is called to cancel a pending batch update. The Recordset must be in batch update mode, otherwise an error will occur.
Since you cannot predict what the current record will be after calling this property, you will need to move to a known record. For example, you could call the MoveFirst method, after the call to the CancelBatch method is completed.
If the attempt to cancel the pending updates fails, the provider does not halt execution, but it will send warnings to the Errors Collection. Therefore you should always check the Errors Collection after the call to the CancelBatch method is completed.
There is one optional parameter.
AffectEnum Constants
| |||||||||||||||||||
See Also
| ||||||||||||||||||||
Example
| If MsgBox("Batch Save All Changes", vbYesNo) = vbYes Then
objRecordset.UpdateBatch
MsgBox "All Changes Updated"
Else
objRecordset.CancelBatch
MsgBox "All Changes Cancelled"
End If
|