共用方式為


RestoreOptions.ReplaceDatabase 屬性

Gets or sets SQL Server should create the specified database and its related files even if another database already exists with the same name

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.SmoExtended (在 Microsoft.SqlServer.SmoExtended.dll 中)

語法

'宣告
Public Property ReplaceDatabase As Boolean 
    Get 
    Set
'用途
Dim instance As RestoreOptions 
Dim value As Boolean 

value = instance.ReplaceDatabase

instance.ReplaceDatabase = value
public bool ReplaceDatabase { get; set; }
public:
property bool ReplaceDatabase {
    bool get ();
    void set (bool value);
}
member ReplaceDatabase : bool with get, set
function get ReplaceDatabase () : boolean 
function set ReplaceDatabase (value : boolean)

屬性值

型別:System.Boolean
True if the SQL Server should create the specified database; otherwise, false.

請參閱

參考

RestoreOptions 類別

Microsoft.SqlServer.Management.Smo 命名空間