System.Web.UI.WebControls.SqlDataSourceView.Update Method

Performs an update operation using the SqlDataSourceView.UpdateCommand SQL string, any parameters that are in the SqlDataSourceView.UpdateParameters collection, and the values that are in the specified keys, values, and oldValues collections.

Syntax

public int Update (IDictionary keys, IDictionary values, IDictionary oldValues)

Parameters

keys
An IDictionary of primary keys to use with the SqlDataSourceView.UpdateCommand property to perform the update database operation. If there are no keys associated with the query or if the SqlDataSourceView.UpdateCommand is not a parameterized SQL query, pass null.
values
An IDictionary of values to use with the SqlDataSourceView.UpdateCommand property to perform the update database operation. If there are no parameters associated with the query or if the SqlDataSourceView.UpdateCommand is not a parameterized SQL query, pass null.
oldValues
An IDictionary that represents the original values in the database. If there are no parameters associated with the query or if the SqlDataSourceView.UpdateCommand is not a parameterized SQL query, pass null.

Returns

A value that represents the number of rows updated in the underlying database.

Remarks

The SqlDataSourceView.Update(IDictionary, IDictionary, IDictionary) method calls the SqlDataSourceView.ExecuteUpdate(IDictionary, IDictionary, IDictionary) method, passing the keys, values, and oldValues parameters. For more information, see SqlDataSource.UpdateCommand.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0