ICatalogManager3::DeleteProperty Method [C++]

Use this method to delete a property from the Product Catalog System.

Definition

[C++]

HRESULT ICatalogManager3::DeleteProperty(BSTRstrPropertyName);

[Visual Basic]

Sub DeleteProperty(strPropertyName As String)

Parameters

  • strPropertyName[C++]
    [in] A BSTR that contains the name of the property to be deleted.
  • strPropertyName[Visual Basic]
    A String that contains the name of the property to be deleted.

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 either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

[Visual Basic] 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.

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_PROPERTY_NAME

[C++] 0x889800A2

[Visual Basic] &H889800A2

The PropertyName 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_PROP_DOESNT_EXIST

[C++] 0x88980005

[Visual Basic] &H88980005

The property name you specified does not exist.
E_CAT_PROP_STILL_IN_DEF

[C++] 0x88980004

[Visual Basic] &H88980004

The property you specified still resides in one or more Product or Category Definitions. To perform this operation, first remove the property from the Product or Category Definitions.
E_CAT_PROP_IS_ID

[C++] 0x88980011

[Visual Basic] &H88980011

The property is currently being used as either the Product or Product-Variant unique ID column in one or more Catalogs. All Catalogs using this property as its unique ID must be deleted before this property can be deleted.

[C++] 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] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

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

[Visual Basic]

Example

myCatalogManager.DeleteProperty "Width"

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

[C++]ICatalogManager3::CreateProperty

[Visual Basic]CatalogManager.CreateProperty

Copyright © 2005 Microsoft Corporation.
All rights reserved.