System.Data.Odbc.OdbcConnection.Database Property

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

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public override string Database { get; }

Value

Documentation for this section has not yet been entered.

Remarks

At first, the OdbcConnection.Database property is set in the connection string. The OdbcConnection.Database property can be updated by using the OdbcConnection.ChangeDatabase(string) method. If you change the current database using an SQL statement or the OdbcConnection.ChangeDatabase(string) method, an informational message is sent and then the property is updated.

Retrieving the OdbcConnection.Database property is equivalent to calling the ODBC function SQLGetInfo with the Attribute parameter set to SQL_ATTR_CURRENT_CATALOG.

Requirements

Namespace: System.Data.Odbc
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0