Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ExecuteReaderAsync Method

DbCommand.ExecuteReaderAsync Method

.NET Framework 4.6 and 4.5

An asynchronous version of ExecuteReader, which executes the CommandText against the Connection and returns a DbDataReader.

Invokes ExecuteDbDataReaderAsync with CancellationToken.None.

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

Public Function ExecuteReaderAsync As Task(Of DbDataReader)

Return Value

Type: System.Threading.Tasks.Task(Of DbDataReader)
A task representing the asynchronous operation.


An error occurred while executing the command text.


An invalid CommandBehavior value.

Managed provider implementers must call ExecuteDbDataReaderAsync in ExecuteReaderAsync. For more information about asynchronous programming, see Asynchronous Programming.

.NET Framework

Supported in: 4.6, 4.5
© 2015 Microsoft