SPDatabase.GetVersionForId Method

Returns the schema version associated with the upgrade sequence specified by ID.

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

Syntax

'Declaration
Protected Function GetVersionForId ( _
    id As Guid, _
    defaultVersion As Version _
) As Version
'Usage
Dim id As Guid
Dim defaultVersion As Version
Dim returnValue As Version

returnValue = Me.GetVersionForId(id, _
    defaultVersion)
protected Version GetVersionForId(
    Guid id,
    Version defaultVersion
)

Parameters

  • id
    Type: System.Guid

    A GUID that identifies the database.

Return Value

Type: System.Version
The version of the associated SPDatabase object.

Remarks

If the database does not contain any version information about the particular sequence, then defaultVersion is returned.

See Also

Reference

SPDatabase Class

SPDatabase Members

Microsoft.SharePoint.Administration Namespace