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


IVersion.CreateVersion Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

IVersion.CreateVersion Method

Creates a new version equivalent to this version.

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

Parameters newName [in] newName is a parameter of type BSTR newVersion [out, retval]
newVersion is a parameter of type IVersion

Product Availability

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

Errors Returned

FDO_E_SE_VERSION_EXISTS: Version already exists.

FDO_E_SE_INVALID_PARAM_VALUE: Invalid parameter value passed to function.

Functional License Check

If your application/site is not appropriately licensed, CreateVersion can return an error of FDO_E_NO_OPERATION_LICENSE.

Remarks

The CreateVersion method allows you to create new version from the existing IVersion. The new version is a child of the current version and is owned by the connected user. The version name is limited to 64 characters and is private by default.

Creating a new version requires an existing version to be the parent of the new version. When the new version is created, the parent and child versions are identical.

See Also

IVersion Interface

.NET Related Topics

GeoDatabaseUI