Search Results for

    Show / Hide Table of Contents

    Interface IAdbTypeMapper

    Stores mappings between .NET types and database types, and allows setting the database type of database parameters from these mappings. Many mappings to provider-independent DbType database types are common across database providers, while other mappings are specific to each provider.

    When the database type is known at compile time, the user or worker should set it explicitly. The mappings are instead used when the database type is only known at runtime, by automatically setting it with SetMappedType(AdbParameter, Type, AdbColumnSchema, ParameterDirection).

    Note that the .NET type name is specified as the compact display name returned by DisplayName(Type).

    Also see predefined type mappings.

    Namespace: actionETL.Adb
    Assembly: actionETL.dll
    Syntax
    public interface IAdbTypeMapper

    Methods

    SetMappedType(AdbParameter, Type, AdbColumnSchema, ParameterDirection)

    Set the database type of a database parameter, using previously defined mappings.

    The database type can be provider-independent such as System.Data.DbType Int32, or a provider-specific one such as System.Data.SqlDbType UniqueIdentifier, or Untyped, which means the provider deduces the database type for each value, e.g. for each row.

    Declaration
    bool SetMappedType(AdbParameter adbParameter, Type dotNetType, AdbColumnSchema adbColumnSchema, ParameterDirection direction)
    Parameters
    Type Name Description
    AdbParameter adbParameter

    The database parameter. Must not be null.

    Type dotNetType

    The .NET CLR type (string, SqlDateTime, etc.) Must not be null.

    AdbColumnSchema adbColumnSchema

    The schema for the database column, or null if not available.

    ParameterDirection direction

    The parameter direction.

    Returns
    Type Description
    Boolean

    true if a mapping was found (including Untyped), otherwise false.

    Exceptions
    Type Condition
    ArgumentNullException
    • adbParameter
    • dotNetType

    See Also

    AdbTypeMapper
    In This Article
    Back to top Copyright © 2023 Envobi Ltd