Delen via


SqlCeDataAdapter.DeleteCommand Property

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

Gets or sets an SQL statement for deleting records from the data set.

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

Property Value

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

Remarks

During Update, if this property is not set and primary key information is present in the DataSet, the DeleteCommand 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 DeleteCommand is assigned to a previously created SqlCeCommand, the SqlCeCommand is not cloned. The DeleteCommand maintains a reference to the previously created SqlCeCommand object.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

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

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

Send comments on this topic.

© Microsoft Corporation. All rights reserved.