IVersionCol::Remove

Meta Data Services Programming

Meta Data Services Programming

IVersionCol::Remove

Removes an object version from the collection.

Syntax

HRESULT Remove(     VARIANT sItem
);

Parts

sItem

[in]
Identifies the item to be removed from the collection. This parameter can be the index, the object identifier, or the Object-Version identifier of the item.

Return Value

S_OK

The method completed successfully.

Error Values

This method failed to complete successfully.

Remarks

There are many different kinds of Object-Version collections. You can apply this method to some of them, but not to others. This method works for:

  • TargetVersions collections. You can use this method to reduce the set of versions of a particular target object that are related to a particular source object.

  • ObjectVersions collections. You can use this method to remove an object version from the set of items contained in the workspace.

This method fails for:

  • Predecessor collections. To enlarge an object version's set of predecessors, use MergeVersion.

  • Successor collections. To enlarge an object version's set of successors, use the CreateVersion method of the IRepositoryObjectVersion interface.

  • ObjectVersions collections. To enlarge an object's set of versions, use the CreateVersion method of the IRepositoryObjectVersion interface.

  • Workspaces collections. To remove a workspace from the set of workspaces in which an object version is present, you must explicitly remove the object version from that workspace's ObjectVersions collection.

  • Checkouts collections. To reduce the number of items checked out to a workspace, use the Checkin method of the IWorkspaceItem interface.

The sItem parameter can be an object identifier for some version collections, but not for others. It can be an object identifier only for the ObjectVersions collection, the Workspaces collection, or the Checkouts collection.

See Also

IVersionCol Interface

Kinds of Version Collections