SPBackupRestoreConsole.DatabaseExists 方法

获取一个值,该值指示指定的数据库是否存在指定的服务器上,并指定用户可以读取。

命名空间:  Microsoft.SharePoint.Administration.Backup
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
)

参数

  • password
    类型:System.String

    用于访问数据库的用户的密码。

返回值

类型:System.Boolean
true如果数据库存在,并且为可读 ;否则为false。

另请参阅

引用

SPBackupRestoreConsole 类

SPBackupRestoreConsole 成员

Microsoft.SharePoint.Administration.Backup 命名空间