Condividi tramite


SqlCeDataAdapter.UpdateCommand Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

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

  [Visual Basic]
  Public Shadows Property UpdateCommand As SqlCeCommand
[C#]
public new SqlCeCommand UpdateCommand {get; set;}
[C++]
public: __property SqlCeCommand* get_UpdateCommand();
public: __property void set_UpdateCommand(SqlCeCommand*);
[JScript]
public hide function get UpdateCommand() : SqlCeCommand;
public function set UpdateCommand(SqlCeCommand);

Property Value

A SqlCeCommand used during Update to update records in the data source that correspond to modified rows in the DataSet.

Remarks

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

When UpdateCommand is assigned to a previously created SqlCeCommand, the SqlCeCommand is not cloned. The UpdateCommand maintains a reference to the previously created SqlCeCommand object.

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

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeDataAdapter Class | SqlCeDataAdapter Members | System.Data.SqlServerCe Namespace | DeleteCommand | InsertCommand | SelectCommand

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.