ExecuteReaderAsync Method

SqlCommand.ExecuteReaderAsync Method

.NET Framework (current version)
 

Initiates the asynchronous execution of the Transact-SQL statement or stored procedure that is described by this SqlCommand.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

NameDescription
System_CAPS_pubmethodExecuteReaderAsync()

An asynchronous version of ExecuteReader, which sends the CommandText to the Connection and builds a SqlDataReader. Exceptions will be reported via the returned Task object.

System_CAPS_pubmethodExecuteReaderAsync(CancellationToken)

An asynchronous version of ExecuteReader, which sends the CommandText to the Connection and builds a SqlDataReader.

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.

System_CAPS_pubmethodExecuteReaderAsync(CommandBehavior)

An asynchronous version of ExecuteReader, which sends the CommandText to the Connection, and builds a SqlDataReader. Exceptions will be reported via the returned Task object.

System_CAPS_pubmethodExecuteReaderAsync(CommandBehavior, CancellationToken)

An asynchronous version of ExecuteReader, which sends the CommandText to the Connection, and builds a SqlDataReader

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.

For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see Asynchronous Programming.

Return to top
Show:
© 2016 Microsoft