Category.RemoveRelationshipToProduct

Ee798905.c++_on(en-US,CS.10).gifEe798905.vb_off(en-US,CS.10).gif

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

Definition

Sub RemoveRelationshipToProduct(varRelatedProductID As Variant,strRelationshipName As String)

Parameters

varRelatedProductID

A Variant that contains the ID of the related product.

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_DEFN_NO_RELATIONSHIP_EXISTS &H88980045 The specified relationship did not exist.
E_CAT_PRODUCT_DOESNT_EXIST &H8898001E The specified product 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 RemoveRelationshipToProduct method removes a relationship between this category and the product identified by the varRelatedProductID parameter. Since more than one relationship may exist between this category and product, you must also specify the name of the relationship you wish to remove in the strRelationshipName parameter. If the product specified as the varRelatedProductID 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.RemoveRelationshipToProduct "Gadget", "FeaturedProduct"

See Also

Category Object

Category.AddRelationshipToProduct


All rights reserved.