DataConnector | ComponentOne
C1.DataConnector Assembly / C1.DataConnector Namespace / SourceTable Class / LoadFromReader Method
An open System.Data.Common.DbDataReader.
Name of newly-created SourceTable.
This action will be invoked when this SourceTable instance is being disposed. In normal cases it's used to release resources like System.Data.Common.DbDataReader, System.Data.Common.DbCommand and System.Data.Common.DbConnection. Set null to do nothing.
Optional parameter that must be used if it desired to convert a retrieved field of a row to a specific type.

In This Topic
    LoadFromReader Method
    In This Topic
    Create a SourceTable from a System.Data.Common.DbDataReader. All datarows will be loaded into memory.
    Syntax
    'Declaration
     
    Public Shared Function LoadFromReader( _
       ByVal reader As DbDataReader, _
       ByVal newTableName As String, _
       ByVal dispose As Action, _
       Optional ByVal columnTypeConversions() As Type _
    ) As SourceTable
    public static SourceTable LoadFromReader( 
       DbDataReader reader,
       string newTableName,
       Action dispose,
       Type[] columnTypeConversions
    )

    Parameters

    reader
    An open System.Data.Common.DbDataReader.
    newTableName
    Name of newly-created SourceTable.
    dispose
    This action will be invoked when this SourceTable instance is being disposed. In normal cases it's used to release resources like System.Data.Common.DbDataReader, System.Data.Common.DbCommand and System.Data.Common.DbConnection. Set null to do nothing.
    columnTypeConversions
    Optional parameter that must be used if it desired to convert a retrieved field of a row to a specific type.

    Return Value

    See Also