Click or drag to resize
AbstractDataConnectionExecuteNonQueryAsync Method

An asynchronous version of ExecuteNonQuery(String, QueryDataParameters, QueryTypeEnum, Boolean) which executes the query asynchronously and returns the number of rows affected.

The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 10.0.0
Syntax
C#
public virtual Task<int> ExecuteNonQueryAsync(
	string queryText,
	QueryDataParameters queryParams,
	QueryTypeEnum queryType,
	bool requiresTransaction,
	CancellationToken cancellationToken
)

Parameters

queryText
Type: SystemString
Query or stored procedure to be run.
queryParams
Type: CMS.DataEngineQueryDataParameters
Query parameters.
queryType
Type: CMS.DataEngineQueryTypeEnum
Indicates if query is a SQL query or stored procedure.
requiresTransaction
Type: SystemBoolean
If true, the query should run within transaction.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation instruction.

Return Value

Type: TaskInt32
A task representing the asynchronous operation.

Implements

IDataConnectionExecuteNonQueryAsync(String, QueryDataParameters, QueryTypeEnum, Boolean, CancellationToken)
See Also