System.Data.OleDb.OleDbDataAdapter.UpdateCommand Property

Gets or sets an SQL statement or stored procedure used to update records in the data source.

Syntax

[System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.DBCommandEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DefaultValue(null)]
public OleDbCommand UpdateCommand { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

During System.Data.Common.DbDataAdapter.Update(System.Data.DataSet), if this property is not set and primary key information is present in the System.Data.DataSet, the OleDbDataAdapter.UpdateCommand can be generated automatically if you set the OleDbDataAdapter.SelectCommand property and use the System.Data.OleDb.OleDbCommandBuilder. Then, any additional commands that you do not set are generated by the System.Data.OleDb.OleDbCommandBuilder. This generation logic requires key column information to be present in the System.Data.DataSet. For more information, see Automatically Generated Commands.

When OleDbDataAdapter.UpdateCommand is assigned to a previously created System.Data.OleDb.OleDbCommand, the System.Data.OleDb.OleDbCommand is not cloned. The OleDbDataAdapter.UpdateCommand maintains a reference to the previously created System.Data.OleDb.OleDbCommand object.

Note:

If execution of this command returns rows, these rows may be merged with the System.Data.DataSet depending on how you set the OleDbCommand.UpdatedRowSource property of the System.Data.OleDb.OleDbCommand object.

Requirements

Namespace: System.Data.OleDb
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0