Share via


Category3.RemoveRelationshipToCategory Method (PIA)

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

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Sub RemoveRelationshipToCategory(strRelatedCategoryName As String,
  strRelationshipName As StringstrCatalogName As String)

[C#]

using Microsoft.CommerceServer.Interop.Catalog;
…
public void RemoveRelationshipToCategory(stringstrRelatedCategoryName,
  stringstrRelationshipNamestringstrCatalogName);

Parameters

[Visual Basic .NET]

  • strRelatedCategoryName
    A String that contains the name of the related category.
  • strRelationshipName
    A String that contains the name of the relationship.
  • strCatalogName
    A String that contains the name of the catalog containing the related category.

[C#]

  • strRelatedCategoryName
    A string that contains the name of the related category.
  • strRelationshipName
    A string that contains the name of the relationship.
  • strCatalogName
    A string that contains the name of the catalog containing the related category.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

The following table shows the custom COM errors that a COMException can wrap.

Constant Value Description
E_CAT_CATALOG_DOESNT_EXIST

[C#] 0x88980002

[Visual Basic .NET] &H88980002

The catalog name you specified does not exist.
E_CAT_INVALID_CATALOGNAME

[C#] 0x88980063

[Visual Basic .NET] &H88980063

The catalog Name you specified is invalid. Catalog names cannot be blank.
E_CAT_INVALID_CATALOG_NAME_LENGTH

[C#] 0x88980042

[Visual Basic .NET] &H88980042

The catalog name you specified exceeds the maximum limit of 85 characters.
E_CAT_CHARACTER_NOT_ALLOWED

[C#] 0x8898003D

[Visual Basic .NET] &H8898003D

The catalog name you specified has one of the nine reserved characters " [ ] , ' ( )#. which should not be used.
E_CAT_INVALID_CATEG_LENGTH

[C#] 0x88980047

[Visual Basic .NET] &H88980047

The category name you specified is either blank or exceeds the maximum allowed length of 128 characters or cannot be converted to a string.
E_CAT_INVALID_CATEG_LENGTH

[C#] 0x88980047

[Visual Basic .NET] &H88980047

The category name you specified is either blank or exceeds the maximum allowed length of 128 characters or cannot be converted to a string.
E_CAT_VC_INVALID_PROD_ID_OR_CATEGORY_NAME

[C#] 0x889800FB

[Visual Basic .NET] &H889800FB

The value you specified for the ProductID or CategoryName exceeds the maximum allowed length of 348 characters.
E_CAT_INVALID_RELATION_NAME

[C#] 0x88980054

[Visual Basic .NET] &H88980054

The value you specified for the relationship name is blank or exceeds 128 characters. relationship names should not be blank and should be less than or equal to 128 characters.
E_CAT_INVALID_PARAMETER

[C#] 0x889800B6

[Visual Basic .NET] &H889800B6

The input parameter <parameter number> is invalid.
E_CAT_PRODUCT_DOESNT_EXIST

[C#] 0x8898001E

[Visual Basic .NET] &H8898001E

The product you specified doesn't exist.
E_CAT_CATEGORY_DOESNT_EXIST

[C#] 0x8898001C

[Visual Basic .NET] &H8898001C

The category you specified doesn't exist.
E_CAT_DEFN_NO_RELATIONSHIP_EXISTS

[C#] 0x88980045

[Visual Basic .NET] &H88980045

The relationship that you specified either does not exist or is a inherited relationship, and therefore cannot be edited.
E_CAT_VC_ERROR_IN_PROPAGATING_BC_CHANGES

[C#] 0x88980101

[Visual Basic .NET] &H88980101

There was an error in propagating the base catalog changes to the dependent virtual catalogs.

Remarks

The RemoveRelationshipToCategory method removes a relationship between this category and the category named in the strRelatedCategoryName parameter. Because 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.**

[Visual Basic .NET]

Example

myCategory.RemoveRelationshipToCategory("Gadget", "Accessory", "myCat")

Requirements

Namespace: Microsoft.CommerceServer.Interop.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: cataloglib (in cataloglib.dll)

See Also

Category Class

Category3.AddRelationshipToCategory

Category3.RemoveRelationshipToProduct

Copyright © 2005 Microsoft Corporation.
All rights reserved.