.NET Client Documentation
5.5.0
Search Results for

    Show / Hide Table of Contents

    ExecuteCommandAsync Method

    ExecuteCommandAsync(string, object[], SqlStatementOptions, CancellationToken)

    Executes a SQL command.

    Declaration
    Task<long> ExecuteCommandAsync(string sql, object[] parameters = null, SqlStatementOptions options = null, CancellationToken cancellationToken = default)
    Parameters
    string sql

    The SQL command text to execute.

    object[] parameters

    Parameters for the SQL command.

    SqlStatementOptions options

    Options for the SQL command (defaults to Default).

    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Task<long>

    The number of rows affected byt the command.

    Remarks

    The sql query text can contain parameter placeholders, specified via a '?' character. Each occurrence of the '?' character is replaced by the next parameter from the parameters ordered list.

    ExecuteCommandAsync(string, SqlStatementOptions, CancellationToken, params object[])

    Executes a SQL command.

    Declaration
    Task<long> ExecuteCommandAsync(string sql, SqlStatementOptions options = null, CancellationToken cancellationToken = default, params object[] parameters)
    Parameters
    string sql

    The SQL command text to execute.

    SqlStatementOptions options

    Options for the SQL command (defaults to Default).

    CancellationToken cancellationToken

    A cancellation token.

    object[] parameters

    Parameters for the SQL command.

    Returns
    Task<long>

    The number of rows affected byt the command.

    Remarks

    The sql query text can contain parameter placeholders, specified via a '?' character. Each occurrence of the '?' character is replaced by the next parameter from the parameters ordered list.

    In this article
    Back to top Copyright © 2010-2024 Hazelcast, Inc. All rights reserved.
    Generated by DocFX.