AdoNetAppender CreateConnection Method | Apache log4net™ SDK Documentation

Creates an IDbConnection instance used to connect to the database.

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    protected virtual IDbConnection CreateConnection(
    	Type connectionType,
    	string connectionString
    )

    Protected Overridable Function CreateConnection (
    	connectionType As Type,
    	connectionString As String
    ) As IDbConnection

    protected:
    virtual IDbConnection^ CreateConnection(
    	Type^ connectionType,
    	String^ connectionString
    )

    abstract CreateConnection :
            connectionType : Type *
            connectionString : string -> IDbConnection
    override CreateConnection :
            connectionType : Type *
            connectionString : string -> IDbConnection

#### Parameters

connectionType
  Type: System
  Type
  The Type of the IDbConnection object.
connectionString
  Type: System
  String
  The connectionString output from the ResolveConnectionString method.

#### Return Value

Type: IDbConnection
An IDbConnection instance with a valid connection string.
Remarks

This method is called whenever a new IDbConnection is needed (i.e. when a reconnect is necessary).
See Also

#### Reference

AdoNetAppender Class
log4net.Appender Namespace