ICatalogManager3::RemoveCatalogAttribute Method [C++]

Use this method to remove a user-defined catalog attribute from the Product Catalog System.

Definition

[C++]

HRESULT ICatalogManager3::RemoveCatalogAttribute(BSTRstrAttributeName);

[Visual Basic]

Sub RemoveCatalogAttribute(strAttributeName As String)

Parameters

  • strAttributeName[C++]
    [in] A BSTR that contains the name of the attribute to be removed.
  • strAttributeName[Visual Basic]
    A String that contains the name of the attribute to be removed.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] None.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

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

Name Value Description
E_CAT_CATMGR_NOT_INITIALIZED

[C++] 0x889800B5

[Visual Basic] &H889800B5

The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method.
E_CAT_INVALID_ATTRIBUTE

[C++] 0x88980117

[Visual Basic] &H88980117

The attribute name you specified is invalid. Attribute names cannot be blank and cannot exceed 36 characters. Attribute names cannot begin with a digit and cannot contain one of the following five reserved characters .,"[]
E_CAT_INVALID_PARAMETER

[C++] 0x889800B6

[Visual Basic] &H889800B6

The input parameter <parameter number> is invalid.
E_CAT_BUILTIN_CATALOG_ATTRIBUTE

[C++] 0x889800B0

[Visual Basic] &H889800B0

The catalog attribute that you specified is a built in catalog attribute and hence cannot be added or removed.
E_CAT_INVALID_PROPERTY_NAME

[C++] 0x889800A2

[Visual Basic] &H889800A2

The property name you specified is invalid. Property names cannot be blank and cannot exceed 100 characters. Property names cannot begin with a digit and cannot contain one of the following five reserved characters .,"[]
E_CAT_CATALOG_ATTR _DOES_NOT_EXIST

[C++] 0x88980112

[Visual Basic] &H88980112

The catalog attribute that you specified does not exist.

Remarks

If the attribute specified in the strAttributeName parameter does not exist, the method will complete successfully and return S_OK.

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

[Visual Basic]

Example

myCatalogManager.RemoveCatalogAttribute("Color")

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.