Batch optimistic updating
Attempting to access any of the fields of a record that has been deleted will generate an error.Update Person p set = :name_1 where = :id_1, = :name_2 where = :id_2, = :name_3 where = :id_3 ....There is certainly a lot of happy gloss on the subject and a noticeable lack of warnings (at least where I looked). Execute the sql, in fact that's the mechanism I use most--I mentioned the pass-thru because that's the quickest (in terms of coding time) way to get things going.Thanks, Bill Bill, It's not ADO, it's the updateable recordsets that I frown upon. But updateable recordsets are slow, and you have less control.Once you move to another record, the deleted record is lost from the Recordset.However, you can cancel all types of pending changes, including deletions, by calling the Cancel Batch method.The Lock Type property sets or returns a Lock Type Enum value that specifies the type of locking when editing a record in a Recordset. This property is read/write on a closed Recordset and read-only on an open Recordset.Note: Set this property before opening the Recordset. If the requested Lock Type setting is not supported, the provider will choose another type of locking.
Option 1 is not very useful because it will generate N UPDATE statements that cannot be batched.
If you are in client-side batch optimistic updating mode, the record will be removed from the Recordset, but it will not actually be deleted from the database until you call the Update Batch method.