command builder
Brief describe command builder class work.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jul 17, 2012, 11:48 PM
hi,
It automatically generates single-table commands that are used to reconcile changes made to a DataSet with the associated SQL Server database.
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 a SQL statement and uses the SelectCommand property to commit the changes made in DataSet.
DataSet dset = new DataSet();
SqlConnection con = new SqlConnection("myConnectionString");
//Autogenerate Insert, Update & Delete commands
SqlDataAdapter adp = new SqlDataAdapter("Select from table1", con);
SqlCommandBuilder scb = new SqlCommand(adp);
//Fill the dataset
da.Fill(dset,"table1");
please refer
http://vb.net-informations.com/dataadapter/dataadapter-commandbuilder-sqlserver.htm
hope this will help you.
VulpesPosted Jul 17, 2012, 10:42 AM