Freigeben über


Database.ID-Eigenschaft

Gets the database ID value that uniquely identifies the database.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
Public ReadOnly Property ID As Integer 
    Get
'Usage
Dim instance As Database 
Dim value As Integer 

value = instance.ID
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
public int ID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
public:
virtual property int ID {
    int get () sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
abstract ID : int
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
override ID : int
final function get ID () : int

Eigenschaftswert

Typ: System.Int32
An Int32 value that specifies the database ID value.

Implementiert

IDatabaseOptions.ID

Hinweise

This property corresponds to the database ID value held in the system tables.

Siehe auch

Verweis

Database Klasse

Microsoft.SqlServer.Management.Smo-Namespace

Andere Ressourcen

Arbeiten mit Datenbankobjekten

sys.databases (Transact-SQL)

Erstellen, Ändern und Löschen von Datenbanken

CREATE DATABASE (Transact-SQL)