SqlCeDataAdapter.InsertCommand 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 insert new records into the data source.
Public Shadows Property InsertCommand As SqlCeCommand
[C#]
public new SqlCeCommand InsertCommand {get; set;}
[C++]
public: __property SqlCeCommand* get_InsertCommand();public: __property void set_InsertCommand(SqlCeCommand*);
[JScript]
public hide function get InsertCommand() : SqlCeCommand;public function set InsertCommand(SqlCeCommand);
Property Value
A SqlCeCommand used during Update to insert records in the data source that correspond to new rows in the DataSet.
Remarks
During Update, if this property is not set and primary key information is present in the DataSet, the InsertCommand 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 InsertCommand is assigned to a previously created SqlCeCommand, the SqlCeCommand is not cloned. The InsertCommand maintains a reference to the previously created SqlCeCommand object.
Note If execution of this command returns rows, these rows may be added to the DataSet depending on how you set the UpdatedRowSource property of the SqlCeCommand object.
Requirements
Platforms: .NET Compact Framework
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
SqlCeDataAdapter Class | SqlCeDataAdapter Members | System.Data.SqlServerCe Namespace | DeleteCommand | SelectCommand | UpdateCommand