ICatalogManager3::Initialize Method [C++]

Use this method to initialize a CatalogManager object. This method should be called once before calling any other methods or properties.

Definition

[C++]

HRESULT ICatalogManager3::Initialize(BSTRstrConfigString,
  VARIANT_BOOLfIsADOConnectionStringVARIANTlNumFullTextCatalogs,
);

[Visual Basic]

Sub Initialize(strConfigString As String,
  fIsADOConnectionString As BooleanOptional lNumFullTextCatalogs As Variant,
)

Parameters

  • strConfigString[C++]
    [in] A BSTR that contains the configuration string.
  • strConfigString[Visual Basic]
    A String that contains the configuration string.
  • fIsADOConnectionString[C++]
    [in, defaultvalue (0)] A VARIANT_BOOL that determines whether the strConfigString parameter refers to an ActiveX Data Object (ADO) connection string or a site name. A value of True indicates an ADO connection string. A value of False indicates a site name.
  • fIsADOConnectionString[Visual Basic]
    A Boolean that determines whether the strConfigString parameter refers to an ADO connection string or a site name. A value of True indicates an ADO connection string. A value of False indicates a site name. The default is False.
  • lNumFullTextCatalogs[C++]
    [in, optional] A VARIANT that contains the maximum number of full text catalogs (indexes) to create. The default and maximum value is 256.
  • lNumFullTextCatalogs[Visual Basic]
    A Variant that contains the maximum number of full text catalogs (indexes) to create. The default and maximum value is 256.

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.

Constant Value Description
E_CAT_CATMGR_ALREADY_INITIALIZED

[C++] 0x88980062

[Visual Basic] &H88980062

The CatalogManager object has already been initialized. Each catalog manager object can be initialized only once.
E_CAT_INVALID_PARAMETER

[C++] 0x889800B6

[Visual Basic] &H889800B6

The input parameter <parameter number> is invalid
E_CAT_INVALID_NUMFULLTEXT_CATALOGS

[C++] 0x889800E8

[Visual Basic] &H889800E8

The number of fulltext catalogs to create should be between 0 and 256
E_CAT_CATALOGRESOURCE_INIT_FAILED

[C++] 0x88980030

[Visual Basic] &H88980030

Unable to read the Product Catalog Resource from the site specified. Check that the Commerce.Adminhlpr component (Adminhlpr.dll) is registered, the site name is valid, and the site contains the Product Catalog Resource.
E_CAT_INVALID_CATALOG_SCHEMA

[C++] 0x889800D8

[Visual Basic] &H889800D8

The Catalog Schema does not correspond to this version of Commerce Server 2002.

[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

When the CatalogManager object has full text search enabled, creating or importing a product catalog will create a separate full text search-enabled catalog (index) until the number of indexes equals the value of the parameter lNumFullTextCatalogs. After the maximum number of indexes have been created, new product catalogs will share existing indexes. Each new product catalog will be assigned to whichever index is smallest at the time the product catalog is created.

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

[Visual Basic]

Example

myCatalogManager.Initialize strConfigString, TRUE

See Also

[C++]CatalogManager Object

[Visual Basic]CatalogManager Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.