CatalogManager3.RenameProperty Method (PIA)

Use this method to rename a property.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Sub RenameProperty(strOldPropertyName As String,
  strNewPropertyName As String)

[C#]

using Microsoft.CommerceServer.Interop.Catalog;
…
public void RenameProperty(stringstrOldPropertyName,
  stringstrNewPropertyName);

Parameters

[Visual Basic .NET]

  • strOldPropertyName
    A String that contains the existing name of the property.
  • strNewPropertyName
    A String that contains the wanted name of the property.

[C#]

  • strOldPropertyName
    A string that contains the existing name of the property.
  • strNewPropertyName
    A string that contains the wanted name of the property.

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.

Name Value Description
E_CAT_CATMGR_NOT_INITIALIZED

[C#] 0x889800B

[Visual Basic .NET] &H8898005

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

[C#] 0x889800A

[Visual Basic .NET] &H8898002

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#] 0x8898000

[Visual Basic .NET] &H8898005

The property name you specified does not exist.
E_CAT_PROP_EXISTS

[C#] 0x8898000

[Visual Basic .NET] &H8898003

The property name you specified already exists.
E_CAT_PROP_IS_ID

[C#] 0x8898001

[Visual Basic .NET] &H8898001

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.

[Visual Basic .NET]

Example

myCatalogManager.RenameProperty("Weight", "Wt.")

Requirements

Namespace: Microsoft.CommerceServer.Interop.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: cataloglib (in cataloglib.dll)

See Also

CatalogManager3 Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.