The **SqlCommandBuilder** opens the Connection associated with the DataAdapter 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 C# Source Code demonstrate how to use the SqlDataAdapter object to update a SQL Server database with data modifications that are run on a DataSet Object that is populated with data from a table in the database using SqlCommandBuilder object.The **DataAdapter** is a part of the ADO.NET Data Provider. ADO.NET DataAdapter is used to manage four separate Command objects. The InsertCommand , the UpdateCommand , and the DeleteCommand properties of the SqlDataAdapter object update the database with the data modifications that are run on a DataSet object. The SqlCommand objects that are assigned to these properties can be created manually in code or automatically generated by using the SqlCommandBuilder object.
Interviews1 answer
What is difference between CommandBuilder and DataAdapter class?
1 Answer
Jayraj ChhayaPosted Sep 10, 2022, 4:38 AM EDT


