Export (0) Print
Expand All

DbConnection.Database Property

Gets the name of the current database after a connection is opened, or the database name specified in the connection string before the connection is opened.

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)

public abstract string Database { get; }

Property Value

Type: System.String
The name of the current database or the name of the database to be used after a connection is opened. The default value is an empty string.

Implements

IDbConnection.Database

A connection typically updates this property dynamically when the current database changes.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft