dotConnect for Snowflake Documentation
On this page
    Execution of DML Statements
    On this page

    dotConnect for Snowflake does not parse or rewrite DML statements. They are sent to Snowflake as is and executed by Snowflake.

    Syntax and Limitations

    DML statements must follow the Snowflake DML syntax and limitations described in General DML commands in the Snowflake documentation. Note the following:

    Parameters

    Parameters in DML statements are passed to Snowflake as bindings. For details, see Using Parameters.

    Number of Affected Rows

    The ExecuteNonQuery method and the RecordsAffected property of the data reader return the number of rows affected by the statement: the sum of the rows inserted, updated, and deleted, as reported by Snowflake. For MERGE, it is the total number of rows inserted, updated, and deleted. For other statements, for example, SELECT, DDL statements, or ALTER SESSION, they return -1. If the sum doesn't fit the Int32 type, ExecuteNonQuery returns -1.

    Command Timeout

    By default, the CommandTimeout property of a SnowflakeCommand is 3600 seconds (1 hour).

    Transactions

    To execute several DML statements as a single unit, use a transaction. For details, see Modifying Data Overview.