ArcObjects Library Reference (Carto)  

IChangeDatabaseVersion.Execute Method

Replaces the version of the feature classes for all the layers that belong to the From version to To version.

[Visual Basic .NET]
Public Function Execute ( _
    ByVal pFrom As IVersion, _
    ByVal pTo As IVersion, _
    ByVal pMap As IBasicMap _
) As ISet
[C#]
public ISet Execute (
    IVersion pFrom,
    IVersion pTo,
    IBasicMap pMap
);
[C++]
HRESULT Execute(
  IVersion* pFrom,
  IVersion* pTo,
  IBasicMap* pMap,
  ISet** ppChangedTables
);
[C++]

Parameters

pFrom [in]

  pFrom is a parameter of type IVersion

pTo [in]

  pTo is a parameter of type IVersion

pMap [in]

  pMap is a parameter of type IBasicMap

ppChangedTables [out, retval]

  ppChangedTables is a parameter of type ISet

Product Availability

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

Remarks

The Execute method is used to change the version of versioned data from one version to another.  The versions can be transactional or historical.  The input parameters of this method are:

pFrom: The version to move away from.  Only layers with a data source referencing this version will be changed.

pTo: The version to change to.

pMap: An IBasicMap reference, which could be a Map, Globe, or Scene, that contains the layers to be changed.

The return parameter of the method is a set of table and layer references of the layers that had their version changed.

 

This command fires the following events:

IActiveViewEvents::ContentsChanged when executed on a Map, Scene, or Globe.

Additionally the events IMapEvents::FeatureClassChanged and IMapEvents2::TableChanged are fired for each layer and table respectively when changing the version on a Map.

When executing this method on a Map, you may wish to call IMapAdmin::FireChangeVersion prior to performing the version change to additionally notify listeners of the change.

See Also

IChangeDatabaseVersion Interface