Category.RemoveRelationshipToCategory

Ee810730.c++_on(en-US,CS.10).gifEe810730.vb_off(en-US,CS.10).gif

Use this method to remove a relationship between the specified category and this category.

Definition

Sub RemoveRelationshipToCategory(strRelatedCategoryName As String,strRelationshipName As String)

Parameters

strRelatedCategoryName

A String that contains the name of the related category.

strRelationshipName

A String that contains the name of the relationship.

Return Values

None.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_CATEGORY_DOESNT_EXIST &H8898001C The category you specified either did not exist or was not a parent of this category.
E_CAT_DEFN_NO_RELATIONSHIP_EXISTS &H88980045 The specified relationship did not exist.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The RemoveRelationshipToCategory method removes a relationship between this category and the category named in the strRelatedCategoryName parameter. Since more than one relationship may exist between these two categories, you must also specify the name of the relationship you wish to remove in the strRelationshipName parameter. If the category specified as the strRelatedCategoryName parameter does not exist or the relationship specified as the strRelationshipName parameter does not exist, then this method will fail.**

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

myCategory.RemoveRelationshipToCategory "Gadget", "Accessory"

See Also

Category Object

Category.AddRelationshipToCategory

Category.RemoveRelationshipToProduct


All rights reserved.