Właściwość Login.DefaultDatabase
Pobiera lub ustawia domyślna baza danych przypisany do konta logowania po zalogowaniu się do wystąpienie SQL Server.
Ten interfejs API nie jest zgodny ze specyfikacją CLS.
Przestrzeń nazw: Microsoft.SqlServer.Management.Smo
Zestaw: Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)
Składnia
'Deklaracja
<SfcReferenceAttribute(GetType(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']", _
)> _
<CLSCompliantAttribute(False)> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase, _
"master")> _
Public Property DefaultDatabase As String
Get
Set
'Użycie
Dim instance As Login
Dim value As String
value = instance.DefaultDatabase
instance.DefaultDatabase = value
[SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)]
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")]
public string DefaultDatabase { get; set; }
[SfcReferenceAttribute(typeof(Database), L"Server[@Name = '{0}']/Database[@Name = '{1}']",
)]
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase,
L"master")]
public:
virtual property String^ DefaultDatabase {
String^ get () sealed;
void set (String^ value) sealed;
}
[<SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)>]
[<CLSCompliantAttribute(false)>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")>]
abstract DefaultDatabase : string with get, set
[<SfcReferenceAttribute(typeof(Database), "Server[@Name = '{0}']/Database[@Name = '{1}']",
)>]
[<CLSCompliantAttribute(false)>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase,
"master")>]
override DefaultDatabase : string with get, set
final function get DefaultDatabase () : String
final function set DefaultDatabase (value : String)
Wartość właściwości
Typ: System.String
A String wartość, która określa domyślna baza danych, do której przypisany jest konto logowania, po zalogowaniu się do wystąpienie SQL Server.
Implementacje
Uwagi
Logowania są domyślnie przypisane do bazy danych po zalogowaniu się do wystąpienie SQL Server jest równoważne DatabaseName UŻYJ Transact-SQL instrukcja.
Zobacz także