SqlHelper..::..UpdateDataset Method

Executes the respective command for each inserted, updated, or deleted row in the DataSet.

Namespace:  Core
Assembly:  Core (in Core.dll)

Syntax


public static void UpdateDataset(
	SqlCommand insertCommand,
	SqlCommand deleteCommand,
	SqlCommand updateCommand,
	DataSet dataSet,
	string tableName
)

Parameters

insertCommand
Type: SqlCommand
A valid transact-SQL statement or stored procedure to insert new records into the data source
deleteCommand
Type: SqlCommand
A valid transact-SQL statement or stored procedure to delete records from the data source
updateCommand
Type: SqlCommand
A valid transact-SQL statement or stored procedure used to update records in the data source
dataSet
Type: DataSet
The DataSet used to update the data source
tableName
Type: String
The DataTable used to update the data source.

Exceptions


ExceptionCondition
ArgumentNullException insertCommand or deleteCommand or updateCommand or tableName

Remarks


e.g.: UpdateDataset(conn, insertCommand, deleteCommand, updateCommand, dataSet, "Order");