Google News
logo
ADO.NET - Interview Questions
What is the SqlCommandBuilder?
CommandBuilder helps you to generate update, delete, and insert commands on a single database table for a data adapter. Similar to other objects, each data provider has a command builder class. The OleDbCommandBuilder, SqlCommonBuilder, and OdbcCommandBuilder classes represent the CommonBuilder object in the OleDb, Sql, and ODBC data providers.
 
Creating a Command Builder Object :
 
Creating a CommonedBuider object is pretty simply. You pass a DataAdapter as an argument of the CommandBuilder constructor. For example,
// Create a command builder object
SqlCommandBuilder builder = new SqlCommandBuilder(adapter);
Advertisement