VistaDB 6
VistaDB.Provider Namespace / VistaDBCommand Class / ExecuteDbDataReaderAsync Method
Options for statement execution and data retrieval.Options for statement execution and data retrieval.
The token to monitor for cancellation requests.The token to monitor for cancellation requests.


In This Topic
    ExecuteDbDataReaderAsync Method
    In This Topic
    Providers should implement this method to provide a non-default implementation for Overload overloads. The default implementation invokes the synchronous System.Data.Common.DbCommand.ExecuteReader method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellation token. Exceptions thrown by ExecuteReader will be communicated via the returned Task Exception property. This method accepts a cancellation token that can be used to request the operation to be cancelled early. Implementations may ignore this request.Providers should implement this method to provide a non-default implementation for System.Data.Common.DbCommand.ExecuteReader overloads.The default implementation invokes the synchronous System.Data.Common.DbCommand.ExecuteReader method and returns a completed task, blocking the calling thread. The default implementation will return a cancelled task if passed an already cancelled cancellation token. Exceptions thrown by ExecuteReader will be communicated via the returned Task Exception property. This method accepts a cancellation token that can be used to request the operation to be cancelled early. Implementations may ignore this request.
    Syntax
    'Declaration
     
    
    <System.Runtime.CompilerServices.AsyncStateMachineAttribute(VistaDB.Provider.VistaDBCommand/d__66)> 
    Protected Overrides NotOverridable Function ExecuteDbDataReaderAsync( _ 
       ByVal behavior As System.Data.CommandBehavior, _ 
       ByVal cancellationToken As System.Threading.CancellationToken _ 
    ) As System.Threading.Tasks.Task(Of DbDataReader)
    'Usage
     
    
    Dim instance As VistaDBCommand
    Dim behavior As System.Data.CommandBehavior
    Dim cancellationToken As System.Threading.CancellationToken
    Dim value As System.Threading.Tasks.Task(Of DbDataReader)
     
    value = instance.ExecuteDbDataReaderAsync(behavior, cancellationToken)
    [System.Runtime.CompilerServices.AsyncStateMachine(VistaDB.Provider.VistaDBCommand/d__66)] 
    protected override System.Threading.Tasks.Task<DbDataReader> ExecuteDbDataReaderAsync( 
       System.Data.CommandBehavior behavior, 
       System.Threading.CancellationToken cancellationToken 
    )

    Parameters

    behavior
    Options for statement execution and data retrieval.Options for statement execution and data retrieval.
    cancellationToken
    The token to monitor for cancellation requests.The token to monitor for cancellation requests.

    Return Value

    A task representing the asynchronous operation.A task representing the asynchronous operation.
    Exceptions
    ExceptionDescription
    An error occurred while executing the command text.
    An invalid System.Data.CommandBehavior value.
    An error occurred while executing the command text.
    An invalid System.Data.CommandBehavior value.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also