VistaDB 6
VistaDB.Provider Namespace / VistaDBConnection Class / OpenAsync Method / OpenAsync(CancellationToken) Method
The cancellation instruction.


In This Topic
    OpenAsync(CancellationToken) Method
    In This Topic
    This is the asynchronous version of System.Data.Common.DbConnection.Open. Providers should override with an appropriate implementation. The cancellation token can optionally be honored. The default implementation invokes the synchronous System.Data.Common.DbConnection.Open call and returns a completed task. The default implementation will return a cancelled task if passed an already cancelled cancellationToken. Exceptions thrown by Open will be communicated via the returned Task Exception property. Do not invoke other methods and properties of the DbConnection object until the returned Task is complete.
    Syntax
    'Declaration
     
    
    Public Overloads Function OpenAsync( _
       ByVal cancellationToken As System.Threading.CancellationToken _
    ) As System.Threading.Tasks.Task
    'Usage
     
    
    Dim instance As VistaDBConnection
    Dim cancellationToken As System.Threading.CancellationToken
    Dim value As System.Threading.Tasks.Task
     
    value = instance.OpenAsync(cancellationToken)
    public System.Threading.Tasks.Task OpenAsync( 
       System.Threading.CancellationToken cancellationToken
    )

    Parameters

    cancellationToken
    The cancellation instruction.

    Return Value

    A task representing the asynchronous operation.
    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