English

Bug: The Change Version command disconnects Feature Layers from their data source when no default subtype is specified

Description

The Change Version command in ArcMap disconnects the Feature Layer from the source Feature Class, when no default subtype has been defined. No error message is produced; the layer is just not associated to any Feature Class.

Cause

This problem is due to IFeatureWorkspace.OpenFeatureClass failing when no default subtype is set, and the FeatureClass is already open but pointing to a different version. The change version code is not anticipating the call to fail and is setting the FeatureLayer's FeatureClass to NULL.

Workaround

Set a default subtype for the FeatureClass.

Related Information