ArcObjects Library Reference (GeoDatabase)  

IVersionedWorkspace.FindVersion Method

Finds a specific version given it's name.

[Visual Basic .NET]
Public Function FindVersion ( _
    ByVal Name As String _
) As IVersion
[C#]
public IVersion FindVersion (
    string Name
);
[C++]
HRESULT FindVersion(
  BSTR Name,
  IVersion** resultVersion
);
[C++]

Parameters

Name [in]   Name is a parameter of type BSTR resultVersion [out, retval]

  resultVersion is a parameter of type IVersion

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Errors Returned

FDO_E_SE_VERSION_NOEXIST: Version not found.

Remarks

FindVersion returns an IVersion interface which is commonly used to read or set a version's properties. The interface requires a string as input. The value of the string is case sensitive and a version's owner should be prefixed as owner.version. If an owner is not specified, only the versions which the user is connected owns are searched.

If it is the application developer's goal to obtain a reference to the DEFAULT version, it is recommended to use the DefaultVersion property as opposed to passing in a literal string to FindVersion method. The DefaultVersion method will always return a IVersion object referencing the default version of the workspace from which the name can be obtained through VersionName property on the IVersionInfo interface.

See Also

IVersionedWorkspace Interface

.NET Related Topics

Editing with the geodatabase API | Finding differences between versions