A popular and very powerful feature of ADO is its capability to "dissociate" a Recordset from its parent Connection. Once you break off a Recordset from its Connection, you can pass it to another ADO-aware tier where it can be manipulated at will. You can scroll through the rows, add new ones, and delete and update rows. All of these changes are saved in the Recordset object itself. You can save the Recordset locally using the Save method, as we discussed previously, or send it to another tier for processing.
There are a few requirements that you must satisfy to get the disconnected Recordset to work. You must:
That's it. When you're ready to post the changes to the database, you can reassociate the Recordset with a valid Connection object and use the UpdateBatch method to post the changes.
Team-Fly |