Using RDS.DataControl to Pass Updated Disconnected Recordset Objects Back to the Middle Tier

   

Data-bound controls enable the user to visually edit, add, or delete records. All changes by the user are stored locally until the user explicitly submits or cancels the update.

Typically, you will bind a grid control to an RDS.DataControl object, and then add, edit, and delete records in the client-side Recordset via the user interface. After you update the client-side data, you need to save the changed information to the database by using the SubmitChanges method with the RDS.DataControl object. The SubmitChanges method submits pending changes of the locally cached updatable Recordset to the OLE DB data source specified in the RDS.DataControl object's Connect property.

The following code example shows how to do this:

Sub Update_OnClick
   ADC1.SubmitChanges
End Sub

Only the changed records are sent for modification, and either all of the changes succeed or all of them fail together.

You can also include a Cancel button to cancel changes to the Recordset:

Sub Cancel_OnClick
   ADC1.CancelUpdate
End Sub

Notes