Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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:
property String^ Database {
	virtual String^ get() abstract;
}

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.

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

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft