Database Property
Collapse the table of content
Expand the table of content

OleDbConnection.Database Property

 

Gets the name of the current database or the database to be used after a connection is opened.

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

override Database : string with 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.

The Database property updates dynamically. If you change the current database using a SQL statement or the ChangeDatabase method, an informational message is sent and the property is updated automatically.

The following example creates an OleDbConnection and displays some of its read-only properties.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft