DefaultDatabase 屬性
Gets or sets the default database that the login account is assigned to after logging on to the instance of SQL Server.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
<SfcPropertyAttribute> _
Public Property DefaultDatabase As String
Get
Set
'用途
Dim instance As Login
Dim value As String
value = instance.DefaultDatabase
instance.DefaultDatabase = value
[SfcPropertyAttribute]
public string DefaultDatabase { get; set; }
[SfcPropertyAttribute]
public:
virtual property String^ DefaultDatabase {
String^ get () sealed;
void set (String^ value) sealed;
}
[<SfcPropertyAttribute>]
abstract DefaultDatabase : string with get, set
[<SfcPropertyAttribute>]
override DefaultDatabase : string with get, set
final function get DefaultDatabase () : String
final function set DefaultDatabase (value : String)
屬性值
型別:System. . :: . .String
A String value that specifies the default database to which the login account is assigned after logging on to the instance of SQL Server.
實作
備註
Logins are assigned to a database by default after logging on to the instance of SQL Server that is equivalent to the USE DatabaseName Transact-SQL statement.