Update method

Description

Updates the tables in a database with the changes made to the DataSet.

Syntax 1

int Update( DataSet dataSet )

Syntax 2

int Update( DataSet dataSet, string srcTable )

Syntax 3

int Update( DataTable dataTable )

Syntax 4

int Update( DataRow[ ] dataRows )

Parameters

dataSet: A DataSet to update with records and, optionally, schema.

srcTable: The name of the source table to use for table mapping.

dataTable: A DataTable to update with records and, optionally, schema.

dataRows: An array of DataRow objects used to update the data source.

Return Value

The number of rows successfully updated from the DataSet.

Usage

The Update is carried out using the InsertCommand, UpdateCommand, and DeleteCommand properties on each row in the data set that has been inserted, updated, or deleted.

See also

“DeleteCommand property”, “InsertCommand property”, “UpdateCommand property”, “Inserting, updating, and deleting rows using the AseDataAdapter object”, and .NET Framework documentation.