asp.net.ph

IDbConnection.Database Property

System.Data Namespace   IDbConnection Class


Returns the name of the current database or the database to be used once a connection is open.

Syntax


Script [ string variable = ] IDbConnection.Database

Property Value


variable The name of the current database or the name of the database to be used once a connection is open.

The property is read only with no default value.

NOTE: You can change the value for this property only by setting the associated keyword in the ConnectionString property.

Remarks

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

Example

The following example shows the simplest way to retrieve and display the Database property of the current connection.

"Database: " + myConn.Database;
  C# VB

 Show me 

See Also

IDbConnection Members   ChangeDatabase   ConnectionString   ConnectionTimeout Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph