SPContentDatabase.ExistsInFarm 属性

获取一个值,该值指示是否在服务器场中存在的内容数据库。

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

语法

声明
Public ReadOnly Property ExistsInFarm As Boolean
    Get
用法
Dim instance As SPContentDatabase
Dim value As Boolean

value = instance.ExistsInFarm
public bool ExistsInFarm { get; }

属性值

类型:System.Boolean
true如果数据库存在于服务器场 ;false以其他方式。

备注

内容数据库可以在服务器场中存在但未连接到服务器场,在这种情况下在它的网站集是孤立文件。在实践中, ExistsInFarm的true值的含义是 (这也是SPContentDatabase对象的Id属性的值) 的内容数据库的 GUID 可以传递给GetObject(Guid)方法,即使IsAttachedToFarm属性是false,它将返回对该内容数据库引用。

另请参阅

引用

SPContentDatabase 类

SPContentDatabase 成员

Microsoft.SharePoint.Administration 命名空间