OracleConnection.Database 属性

定义

获取当前数据库的名称或打开连接后要使用的数据库的名称。Gets the name of the current database or the database to be used after a connection is opened.

public:
 virtual property System::String ^ Database { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public override string Database { get; }
member this.Database : string
Public Overrides ReadOnly Property Database As 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.

属性

注解

Database 属性会动态更新。The Database property updates dynamically. 如果使用 SQL 语句或 ChangeDatabase 方法更改当前数据库,将发送一条信息性消息,并自动更新属性。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.

备注

与其他 .NET Framework 数据提供程序(SQL Server、OLE DB 和 ODBC)中 Connection 对象不同的是,OracleConnection 不支持 ConnectionTimeout 属性。Unlike the Connection object in the other .NET Framework data providers (SQL Server, OLE DB, and ODBC), OracleConnection does not support a ConnectionTimeout property. 使用属性或在连接字符串中设置连接超时值无效,返回的值始终为零。Setting a connection time-out either with a property or in the connection string has no effect, and the value returned is always zero. OracleConnection 还不支持 Database 属性或 ChangeDatabase 方法。OracleConnection also does not support a Database property or a ChangeDatabase method.

适用于

另请参阅