SPBackupRestoreConsole.DatabaseExists method
取得一個值,指出指定的資料庫已存在於指定的伺服器上,並指定使用者可以讀取。
Namespace: Microsoft.SharePoint.Administration.Backup
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function DatabaseExists ( _
server As String, _
name As String, _
username As String, _
password As String _
) As Boolean
'用途
Dim server As String
Dim name As String
Dim username As String
Dim password As String
Dim returnValue As Boolean
returnValue = SPBackupRestoreConsole.DatabaseExists(server, _
name, username, password)
public static bool DatabaseExists(
string server,
string name,
string username,
string password
)
參數
server
Type: System.String裝載資料庫的伺服器。
name
Type: System.String資料庫名稱。
username
Type: System.String使用者的名稱。
password
Type: System.String資料庫的存取權之使用者的密碼。
傳回值
Type: System.Boolean
true如果該資料庫存在且可以讀取 ;否則,請false。