[This is preliminary documentation and is subject to change.]

Gets or sets the name of the database provider.

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version:


public string DBProvider { get; set; }
Visual Basic (Declaration)
Public Property DBProvider As String
Visual Basic (Usage)
Dim instance As DatabaseTarget
Dim value As String

value = instance.DBProvider

instance.DBProvider = value


The parameter name should be a provider invariant name as registered in machine.config or app.config. Common values are:

(Note that provider invariant names are not supported on .NET Compact Framework).

Alternatively the parameter value can be be a fully qualified name of the provider connection type (class implementing IDbConnection) or one of the following tokens:

  • sqlserver, mssql, microsoft or msde - SQL Server Data Provider
  • oledb - OLEDB Data Provider
  • odbc - ODBC Data Provider

See Also