Class OdbcConnectionManager

Generic OdbcConnectionManager - try this connection manager if no particular connection manager for your database exists. There are some limitations to the ETLBox functionality when you use this connection manager:

  • Most ControlFlow Tasks won't work properly, depending on your database
  • SqlTask will work
  • If you use special characters, you need to set the quotation begin / quotation end properties QB and QE that fit to your database (e.g. "[" and "]" for Sql Server or "`" for MySql)
  • DbDestination and DbSource will only work if you provide a TableDefinition that at least define the table and the columns names
Inheritance
System.Object
DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>
OdbcConnectionManager
Implements
IConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction>
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.Connection
Assembly: ETLBox.Odbc.dll
Syntax
    public class OdbcConnectionManager : DbConnectionManager<OdbcConnection, OdbcTransaction, OdbcParameter>, IConnectionManager<OdbcConnection, OdbcTransaction>, IConnectionManager, IDisposable

Constructors

OdbcConnectionManager()

Declaration
    public OdbcConnectionManager()

OdbcConnectionManager(OdbcConnectionString)

Declaration
    public OdbcConnectionManager(OdbcConnectionString connectionString)
Parameters
TypeNameDescription
OdbcConnectionStringconnectionString

Properties

ConnectionManagerType

The database type for the connection manager.

Declaration
    public override ConnectionManagerType ConnectionManagerType { get; protected set; }
Property Value
TypeDescription
ConnectionManagerType
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.ConnectionManagerType

IsOdbcOrOleDbConnection

Indicates if the current connection mangager is used as a OleDb or Odbc Connection.

Declaration
    public override bool IsOdbcOrOleDbConnection { get; }
Property Value
TypeDescription
System.Boolean
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.IsOdbcOrOleDbConnection

QB

The quotation begin character that is used in the database. E.g. SqlServer uses: '[' and Postgres: '"'

Declaration
    public override string QB { get; protected set; }
Property Value
TypeDescription
System.String
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.QB

QE

The quotation end character that is used in the database. E.g. SqlServer uses: ']' and Postgres: '"'

Declaration
    public override string QE { get; protected set; }
Property Value
TypeDescription
System.String
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.QE

Methods

BulkDelete(ITableData)

Performs a bulk delete

Declaration
    public override void BulkDelete(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.BulkDelete(ETLBox.ControlFlow.ITableData)

BulkInsert(ITableData)

Performs a bulk insert

Declaration
    public override void BulkInsert(ITableData data)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.BulkInsert(ETLBox.ControlFlow.ITableData)

BulkSelect(ITableData, ICollection<String>, Action, Action, Action<Object>[])

Declaration
    public override void BulkSelect(ITableData data, ICollection<string> selectColumnNames, Action beforeRowReadAction, Action afterRowReadAction, params Action<object>[] rowActions)
Parameters
TypeNameDescription
ITableDatadata
System.Collections.Generic.ICollection<System.String>selectColumnNames
System.ActionbeforeRowReadAction
System.ActionafterRowReadAction
System.Action<System.Object>[]rowActions
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.BulkSelect(ETLBox.ControlFlow.ITableData, System.Collections.Generic.ICollection<System.String>, System.Action, System.Action, System.Action<System.Object>[])

BulkUpdate(ITableData, ICollection<String>, ICollection<String>)

Performs a bulk update

Declaration
    public override void BulkUpdate(ITableData data, ICollection<string> setColumnNames, ICollection<string> joinColumnNames)
Parameters
TypeNameDescription
ITableDatadata

Batch of data

System.Collections.Generic.ICollection<System.String>setColumnNames
System.Collections.Generic.ICollection<System.String>joinColumnNames
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.BulkUpdate(ETLBox.ControlFlow.ITableData, System.Collections.Generic.ICollection<System.String>, System.Collections.Generic.ICollection<System.String>)

CleanUpBulkInsert(String)

Called after the whole bulk insert operation to change back settings made to improve bulk insert performance

Declaration
    public override void CleanUpBulkInsert(string tablename)
Parameters
TypeNameDescription
System.Stringtablename
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.CleanUpBulkInsert(System.String)

Clone()

Cretes a clone of the current connection manager

Declaration
    public override IConnectionManager Clone()
Returns
TypeDescription
IConnectionManager

A instance copy of the current connection manager

Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.Clone()

OverrideConnectionSpecifics(ConnectionManagerType, String, String, String)

Changes the connection manager type for the generic connector, so that you can try to use it with not supported setups. If you are looking for supported Odbc connection managers, try to use the specific connection managers (e.g. MySqlOdbcConnectionManager for MySql or PostgresOdbcConnectionManager for Postgres)

Declaration
    public void OverrideConnectionSpecifics(ConnectionManagerType connectionManagerType, string QB, string QE, string PP = &quot;@&quot;)
Parameters
TypeNameDescription
ConnectionManagerTypeconnectionManagerType

The new connection type for this connection manager.

System.StringQB

Quotation begin (e.g. "`" for MySql or "[" for SqlServer)

System.StringQE

Quotation end (e.g. "`" for MySql or "]" for SqlServer)

System.StringPP

Parameter placeholder ("@" for most databases)

PrepareBulkInsert(String)

Performs preparations needed to improved performance of a bulk insert operation

Declaration
    public override void PrepareBulkInsert(string tablename)
Parameters
TypeNameDescription
System.Stringtablename
Overrides
ETLBox.Connection.DbConnectionManager<System.Data.Odbc.OdbcConnection, System.Data.Odbc.OdbcTransaction, System.Data.Odbc.OdbcParameter>.PrepareBulkInsert(System.String)

Implements

System.IDisposable