VistaDB 6
VistaDB.Provider Namespace / VistaDBDataReader Class / GetFieldValue<T> Method
Synchronously gets the value of the specified column as a type.
The column to be retrieved.


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

    Parameters

    ordinal
    The column to be retrieved.

    Type Parameters

    T
    Synchronously gets the value of the specified column as a type.

    Return Value

    The column to be retrieved.
    Exceptions
    ExceptionDescription
    The connection drops or is closed during the data retrieval. -or- The System.Data.SqlClient.SqlDataReader is closed during the data retrieval. -or- There is no data ready to be read (for example, the first System.Data.SqlClient.SqlDataReader.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 SQL Server 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