ProductCatalog3.RemoveVirtualCatalogRule Method (PIA)
Use this method to remove a virtual catalog rule.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Sub RemoveVirtualCatalogRule(strCatalogName As String,
vrProductIDOrCategoryName As Object,
vrVariantID As Object,
Optional fCategory As Boolean)
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
…
public void RemoveVirtualCatalogRule(stringstrCatalogName,
objectvrProductIDOrCategoryName,
objectvrVariantID,
boolfCategory);
Parameters
[Visual Basic .NET]
- strCatalogName
A String that contains the base catalog name. - vrProductIDOrCategoryName
An Object that contains the product ID or category name to which the rule applies. - vrVariantID
An Object that contains the variant ID to which the rule applies. - fCategory
A Boolean that specifies whether the parameter vrProductIDOrCategoryName is a product or a category. A value of True (-1) indicates a category. A value of False (0) indicates a product. The default value is False (0).
[C#]
- strCatalogName
A String that contains the base catalog name. - vrProductIDOrCategoryName
An object that contains the product ID or category name to which the rule applies. - vrVariantID
An object that contains the variant ID to which the rule applies. - fCategory
A Boolean that specifies whether the parameter vrProductIDOrCategoryName is a product or a category. A value of True (-1) indicates a category. A value of False (0) indicates a product. The default value is False (0).
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 COMException may wrap as exceptions for this method.
Constant | Value | Description |
---|---|---|
E_CAT_VC_NOT_A_VIRTUAL_CATALOG | [C#] 0x889800FA [Visual Basic .NET] &H889800FA |
Invalid catalog type. This API can only be called on a virtual catalog. |
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] &Hx88980042 |
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 " [ ] , ' ( )#. that should not be used. |
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_VC_INVALID_VARIANT_ID | [C#] 0x889800FC [Visual Basic .NET] &H889800FC |
The value you specified for the VariantID exceeds the maximum allowed length of 348 characters. |
E_CAT_VC_INVALID_ITEM | [C#] 0x889800FD [Visual Basic .NET] &H889800FD |
The specified product/category/variant could not be found in the base catalog. |
E_CAT_VC_DELETION_RULE_NOT_FOUND | [C#] 0x889800FE [Visual Basic .NET] &H889800FE |
The rule could not be deleted because it does not exist. |
Remarks
Set the fCategory parameter to True and the vrProductIDOrCategoryName parameter to an empty string to remove the rule for the catalog specified in the strCatalogName parameter.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Requirements
Namespace: Microsoft.CommerceServer.Interop.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: cataloglib (in cataloglib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.