This document is archived and information here might be outdated.  Recommended version.


IVersionedWorkspace.FindVersion Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IV > IVersionedWorkspace Interface > IVersionedWorkspace.FindVersion Method
ArcGIS Developer Help

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
);
[C++]
Parameters
Name [in]

Name is a parameter of type BSTR

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