top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of the CommandBuilder class?

+5 votes
353 views
What is the use of the CommandBuilder class?
posted Feb 3, 2014 by Merry

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

The CommandBuilder class is used to automatically update a database according to the changes made in a DataSet.

This class automatically registers itself as an event listener to the RowUpdating event. Whenever data inside a row changes, the object of the CommandBuilder class automatically generates an SQL statement and uses the SelectCommand property to commit the changes made in DataSet.

OLEDB provider in .NET Framework has the OleDbCommandBuiider class; whereas, the SQL provider has the SqlCommandBuilder class.

answer Feb 3, 2014 by Salil Agrawal
...