DataConnector | ComponentOne
C1.DataConnector Assembly / C1.DataConnector Namespace / SourceTable Class / InitiateFromReader Method
An open System.Data.Common.DbDataReader
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
    InitiateFromReader Method
    In This Topic
    Create a SourceTable from a System.Data.Common.DbDataReader. Datarows will be lazy-loaded when iterating Rows property.
    Syntax
    'Declaration
     
    Public Shared Function InitiateFromReader( _
       ByVal reader As DbDataReader, _
       ByVal newTableName As String, _
       ByVal dispose As Action, _
       Optional ByVal columnTypeConversions() As Type _
    ) As SourceTable
    public static SourceTable InitiateFromReader( 
       DbDataReader reader,
       string newTableName,
       Action dispose,
       Type[] columnTypeConversions
    )

    Parameters

    reader
    An open System.Data.Common.DbDataReader
    newTableName
    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