Tuesday, April 28, 2009

SqlCommandBuilder Usage

SqlCommandBuilder Class
Automatically generates single-table commands that are used to reconcile changes made to a DataSet with the associated SQL Server database. This class cannot be inherited.

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommandbuilder.aspx

You can use the SqlCommandBuilder to update the change to the adapter generated DataSet to database, and then call the following line

adapter.Update(dataSet, tableName);

No comments: