Search Results for

    Show / Hide Table of Contents

    Namespace actionETL.Adb.OdbcExternal

    Contains the Adb database provider and supporting services for ODBC data sources, and its System.Data.Odbc .NET database provider.

    Classes

    AdbOdbcDataSourceInformationService

    Provides information about an ODBC SQL data source behind a connection, such as what character to use for quoting, how to specify parameter markers etc. The information is mainly taken from the "DataSourceInformation" schema collection, and is used to write provider-independent database code.

    This class is used when creating AdbProvider instances, use one of the Get() overloads to retrieve the required delegate.

    This class can be inherited to overwrite some values, and used to create a custom ODBC provider. See AdbProvider and Information.

    This class is immutable. This avoids threading issues, since an instance is often accessed by multiple threads. Any user custom provider services should also be immutable for the same reason.

    AdbOdbcProvider

    A static class where the GetUniversal() and GetUniversalBasic() overloads return AdbProvider immutable instances that wrap the ODBC ADO.NET database provider for accessing ODBC data sources, which assists with writing provider-independent code, mapping between .NET CLR types and database types, etc. Use it to instantiate AdbConnectionString, AdbConnectionBuilder, AdbKeepOpenConnectionBuilder and and AdbCommandBuilder types, or pass the provider instance to other methods for them to use it.

    Use GetSqlServer(Boolean) etc. to get a targeted provider if available, since they support the most features. Otherwise use the GetUniversal() and GetUniversalBasic() overloads to get a universal provider that works with most ODBC data sources, but lacks some optional services.

    Note that ODBC providers do not support provider-specific data types (i.e. SqlDateTime etc.)

    Note that it is best practice to select which provider to use in only one place in the application, to make it easy to switch to a different provider instance, especially since settings such as how to quote identifiers is specified by creating the appropriate provider instance.

    Each AdbProvider instance contains a set of services that implements the provider functionality. You can create a new modified provider instance from an existing one by using its With*() methods to replace one of its services. Custom services can be derived from existing ones, or created from scratch. Alternatively, create a custom provider by using the AdbProvider constructor, specifying all the services.

    This provider uses the following service classes:

    • AdbSql92InsertStatementService
    • AdbOdbcDataSourceInformationService
    • AdbOdbcTypeMapper
    • AdbOdbcTypeService

    See SQL Database Access for further details.

    AdbOdbcTableInformationService

    An optional service for a ODBC data source that manipulates table identifiers and provides information about table-like objects, such as which ones exists and what their type is (table, view, etc), and which columns are present. This assists with writing provider-independent database code, and is available as TableInformation. Also see HasTableInformationService, AdbOdbcDataSourceInformationService, AdbConnection and AdbProvider.

    Derive from this class (or from a base or descendant class) to customize the information for either the same .NET provider, or for a different but similar .NET provider.

    AdbOdbcTypeMapper

    Stores mappings between .NET types and database types, and allows setting the database type of database parameters from these mappings.

    This class adds mappings for ODBC database types. See the Data Type Mappings , as well as AdbTypeMapper and predefined type mappings for further details.

    This class can be derived from to create a customized provider that revises and adds mappings.

    This class is immutable. This avoids threading issues, since an instance is often accessed by multiple threads. Any user custom provider services should also be immutable for the same reason.

    AdbOdbcTypeService

    Gets and sets types and values on database parameters for a System.Data.Odbc ODBC provider, such as AdbOdbcProvider.

    This class is immutable. This avoids threading issues, since an instance is often accessed by multiple threads. Any user custom provider services should also be immutable for the same reason.

    In This Article
    Back to top Copyright © 2023 Envobi Ltd