Writes all pending batch updates to disk.
recordset.UpdateBatch AffectRecords
The UpdateBatch method syntax has these parts:
Part |
Description |
recordset |
An object variable representing an open Recordset object. |
AffectRecords |
Optional. An AffectEnum value that determines how many records the UpdateBatch method will affect. Can be one of the following constants: |
adAffectCurrent, 1 ¾ Write pending changes only for the current record. adAffectGroup, 2 ¾ Write pending changes for the records that satisfy the current Filter property setting. You must set the Filter property to one of the valid predefined constants in order to use this option. adAffectAll, 3 (Default) ¾ Write pending changes for all the records in the Recordset object, including any hidden by the current Filter property setting. |
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 Update method to save any pending changes to the current record before transmitting the batched changes to the provider.
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 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 Filter property (adFilterAffectedRecords) and the Status property to locate records with conflicts.
To cancel all pending batch updates, use the CancelBatch method.
file: /Techref/language/asp/comp/dameth03_6.htm, 3KB, , updated: 1996/11/21 18:01, local time: 2024/12/27 21:26,
3.145.88.241:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/language/asp/comp/dameth03_6.htm"> UpdateBatch Method (ADO)</A> |
Did you find what you needed? |