Dataadapter with CommandBuilder - OLEDB
The OleDbDataAdapter is a part of the ADO.NET Data Provider. OleDbDataAdapter is used to manage four separate Command objects. The InsertCommand, the UpdateCommand, and the DeleteCommand properties of the OleDbDataAdapter object update the database with the data modifications that are run on a DataSet object. The OleDbCommand objects that are assigned to these properties can be created manually in code or automatically generated by using the OleDbCommandBuilder object.
The OleDbCommandBuilder opens the Connection associated with the OleDbDataAdapter and makes a round trip to the server each and every time it's asked to construct the action queries. It closes the Connection when it's done. The following Source Code demonstrate how to use the OleDbDataAdapter object to update a OLEDB Data Source with data modifications that are run on a DataSet object that is populated with data from a table in the database using OleDbCommandBuilder object.