dotConnect for Dynamics 365 Documentation
Devart.Data.Dynamics Namespace / DynamicsDataAdapter Class / InsertCommand Property

In This Topic
    InsertCommand Property
    In This Topic
    Gets or sets a Dynamics 365 statement to insert new records into the data source.
    Syntax
    'Declaration
     
    Public Shadows Property InsertCommand As DynamicsCommand
    public new DynamicsCommand InsertCommand {get; set;}

    Property Value

    A DynamicsCommand used during an update operation to insert records in the data source that correspond to new rows in the System.Data.DataSet.
    Remarks
    During an update operation, if InsertCommand is not set and primary key information is present in the System.Data.DataSet, you can use the DynamicsCommandBuilder class to automatically generate InsertCommand, and additional commands needed to reconcile the System.Data.DataSet to the data source. To do this, set the SelectCommand property of the DynamicsDataAdapter. For more information see "Automatically Generated Commands" in the Microsoft .NET Framework SDK documentation.

    Note: If execution of this command returns rows, these rows may be added to the System.Data.DataSet depending upon how you set the Devart.Common.DbCommandBase.UpdatedRowSource property of the DynamicsCommand object.

    See Also