CatalogManager3.GetCatalog Method (PIA)

Use this method to retrieve a specified catalog from the Product Catalog System.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Function GetCatalog(strCatalogName As String) As IProductCatalog

[C#]

using Microsoft.CommerceServer.Interop.Catalog;
…
public IProductCatalog GetCatalog(stringstrCatalogName);

Parameters

[Visual Basic .NET]

  • strCatalogName
    A String that contains the name of the catalog to be retrieved.

[C#]

  • strCatalogName
    A string that contains the name of the catalog to be retrieved.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns the IProductCatalog interface of the ProductCatalog object that contains the catalog specified.

[C#] This method returns the IProductCatalog interface used to return the ProductCatalog object.

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

[Visual Basic .NET] &H889800B5

The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method
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] &H88980042

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:

" [ ] , ' ( )#.

These characters should not be used.

S_FALSE

[C#] 0x0000001

[Visual Basic .NET] &H0000001

The catalog does not exist

Remarks

The ProductCatalog object contains valid data only if the method completes successfully.

[Visual Basic .NET]

Example

oCatalog = myCatalogManager.GetCatalog("Cdcatalog")

Requirements

Namespace: Microsoft.CommerceServer.Interop.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: cataloglib (in cataloglib.dll)

See Also

CatalogManager3 Class

CatalogManager3.CreateCatalog

CatalogManager3.DeleteCatalog

Copyright © 2005 Microsoft Corporation.
All rights reserved.