다음을 통해 공유


SPContentDatabase.ExistsInFarm Property

Gets a value that indicates whether the content database exists in the farm.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public ReadOnly Property ExistsInFarm As Boolean
    Get
'Usage
Dim instance As SPContentDatabase
Dim value As Boolean

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

Property Value

Type: System.Boolean
true if the database exists in the farm; false otherwise.

Remarks

A content database can exist in the farm but not be attached to the farm, in which case the site collections within it are orphans. As a practical matter, what a true value for ExistsInFarm means is that you can pass the GUID of the content database (which is also the value of the SPContentDatabase object’s Id property) to the GetObject(Guid) method and it will return reference to the content database even if the IsAttachedToFarm property is false.

See Also

Reference

SPContentDatabase Class

SPContentDatabase Members

Microsoft.SharePoint.Administration Namespace