AdoNetAppender ConnectionString Property | Apache log4net™ SDK Documentation

Gets or sets the database connection string that is 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

    public string ConnectionString { get; set; }

    Public Property ConnectionString As String
    	Get
    	Set

    public:
    property String^ ConnectionString {
    	String^ get ();
    	void set (String^ value);
    }

    member ConnectionString : string with get, set

#### Property Value

Type: String
The database connection string used to connect to the database.
Remarks

The connections string is specific to the connection type. See ConnectionType for more information.

Examples

Connection string for MS Access via ODBC:
Copy

    "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb"

Examples

Another connection string for MS Access via ODBC:
Copy

    "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;"

Examples

Connection string for MS Access via OLE DB:
Copy

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;"

See Also

#### Reference

AdoNetAppender Class
log4net.Appender Namespace