Condividi tramite


SqlCeConnection.Database Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets the name of the current database or the database to be used when a connection is open.

  [Visual Basic]
  Public Overridable ReadOnly Property Database As String  Implements _
   IDbConnection.Database
[C#]
public virtual string Database {get;}
[C++]
public: __property virtual String* get_Database();
[JScript]
public function get Database() : String;

Property Value

The name of the current database or the name of the database to be used when a connection is open. The default value is an empty string. For SQL Server CE, the value for this property should be the full path of the database file; for example, "\myApp\myDB.sdf".

Implements

IDbConnection.Database

Remarks

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

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeConnection Class | SqlCeConnection Members | System.Data.SqlServerCe Namespace | ChangeDatabase | ConnectionString | DataSource

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.