CatalogManager3.RenameDefinition Method (PIA)
Use this method to rename a definition.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Sub RenameDefinition(strOldName As String,
strNewName As String)
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
…
public void RenameDefinition(stringstrOldName,
stringstrNewName);
Parameters
[Visual Basic .NET]
- strOldName
A String that contains the existing name of the definition. - strNewName
A String that contains the wanted name of the definition.
[C#]
- strOldName
A string that contains the existing name of the definition. - strNewName
A string that contains the wanted name of the definition.
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_DEFINITION_LENGTH | [C#] 0x889800E [Visual Basic .NET] &H889800A |
The definition name that you specified is invalid. Definition names should be between 1 and 128 characters in length. |
E_CAT_DEFINITION_EXISTS | [C#] 0x8898000 [Visual Basic .NET] &H889800A |
The Definition you specified already exists. |
E_CAT_DEFINITION_DOESNT_EXIST | [C#] 0x8898000 [Visual Basic .NET] &H889800B |
The Definition you specified does not exist. |
Remarks
This method affects every product and category using the definition.
[Visual Basic .NET]
Example
myCatalogManager.RenameDefinition("T-Shirts", "Tee-Shirts")
Requirements
Namespace: Microsoft.CommerceServer.Interop.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: cataloglib (in cataloglib.dll)
See Also
CatalogManager3.RenameProperty
Copyright © 2005 Microsoft Corporation.
All rights reserved.