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)

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