Click or drag to resize
ConnectionHelperExecuteNonQueryAsync Method (String, QueryDataParameters, QueryTypeEnum, CancellationToken, Boolean)

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: 12.0.0
Syntax
C#
public static Task<int> ExecuteNonQueryAsync(
	string queryText,
	QueryDataParameters parameters,
	QueryTypeEnum queryType,
	CancellationToken cancellationToken,
	bool transaction = false
)

Parameters

queryText
Type: SystemString
Query text.
parameters
Type: CMS.DataEngineQueryDataParameters
Query parameters.
queryType
Type: CMS.DataEngineQueryTypeEnum
Query type.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation instruction.
transaction (Optional)
Type: SystemBoolean
If true, connection uses transaction for the query.

Return Value

Type: TaskInt32
A task representing the asynchronous operation.
See Also