VistaDB 6
VistaDB.Provider Namespace / VistaDBDataReader Class / GetFieldValueAsync Method / GetFieldValueAsync<T>(Int32) Method
The type of the value to be returned.
The type of the value to be returned.


In This Topic
    GetFieldValueAsync<T>(Int32) Method
    In This Topic
    Asynchronously gets the value of the specified column as a type.
    Syntax
    'Declaration
     
    
    Public Overloads Function GetFieldValueAsync(Of T)( _
       ByVal ordinal As System.Integer _
    ) As System.Threading.Tasks.Task(Of T)
    'Usage
     
    
    Dim instance As VistaDBDataReader
    Dim ordinal As System.Integer
    Dim value As System.Threading.Tasks.Task(Of T)
     
    value = instance.GetFieldValueAsync(Of T)(ordinal)
    public System.Threading.Tasks.Task<T> GetFieldValueAsync<T>( 
       System.int ordinal
    )

    Parameters

    ordinal
    The type of the value to be returned.

    Type Parameters

    T
    The type of the value to be returned.

    Return Value

    The type of the value to be returned.
    Exceptions
    ExceptionDescription
    The connection drops or is closed during the data retrieval. -or- The System.Data.Common.DbDataReader is closed during the data retrieval. -or- There is no data ready to be read (for example, the first System.Data.Common.DbDataReader.Read hasn't been called, or returned false). -or- Tried to read a previously-read column in sequential mode. -or- There was an asynchronous operation in progress. This applies to all Get* methods when running in sequential mode, as they could be called while reading a stream.
    Trying to read a column that does not exist.
    T doesn't match the type returned by the data source or cannot be cast.
    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