DataConnector
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 System.Data.Common.DbDataReader, _
       ByVal newTableName As System.String, _
       ByVal dispose As System.Action, _
       Optional ByVal columnTypeConversions() As System.Type _
    ) As SourceTable
    public static SourceTable InitiateFromReader( 
       System.Data.Common.DbDataReader reader,
       System.string newTableName,
       System.Action dispose,
       System.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