IProductCatalog3::RebuildVirtualCatalog Method [C++]

Use this method to rebuild a virtual catalog or all dependent virtual catalogs.

Definition

[C++]

HRESULT IProductCatalog3::RebuildVirtualCatalog(VARIANT_BOOLfRunSynchronously,
  VARIANT_BOOLfForceRebuild);

[Visual Basic]

Sub RebuildVirtualCatalog(Optional fRunSynchronously As Boolean,
  Optional fForceRebuild As Boolean)

Parameters

  • fRunSynchronously[C++]
    [in, optional, defaultvalue (0)] A VARIANT_BOOL that specifies whether to run the method synchronously. A value of True indicates that the method should be run synchronously. A value of False indicates that the method should be run asynchronously.
  • fRunSynchronously[Visual Basic]
    A Boolean that specifies whether to run the method synchronously. A value of True indicates that the method should be run synchronously. A value of False indicates that the method should be run asynchronously. The default value is False.
  • fForceRebuild [C++]
    [in, optional, defaultvalue (0)] A VARIANT_BOOL that specifies whether to force a rebuild. A value of True indicates that catalogs will be rebuilt regardless of status. A value of False indicates that only dirty catalogs will be rebuilt.
  • fForceRebuild[Visual Basic]
    A Boolean that specifies whether to force a rebuild. A value of True indicates that all catalogs will be rebuilt regardless of status. A value of False indicates that only dirty catalogs will be rebuilt. The default value is False.

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 standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. 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] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

The following table describes the custom COM errors this method can return.

Constant Value Description
E_CAT_CATALOG_DOESNT_EXIST

[C++] 0x88980002

[Visual Basic] &H88980002

The catalog name you specified does not exist.

Remarks

Virtual catalogs will only be rebuilt if there has been a rule change, a product deletion, or a category deletion that would affect the contents of the catalog unless the fForceRebuild parameter is set to True*.* If this method is called on a base catalog, it will apply to all virtual catalogs that include products or categories from the base catalog. If this method is called on a virtual catalog, it will apply only to the virtual catalog.

[C++] If you want to rebuild all the virtual catalogs in the Product Catalog System use ICatalogManager3::RebuildAllVirtualCatalogs.

[Visual Basic] If you want to rebuild all the virtual catalogs in the Product Catalog System use CatalogManager.RebuildAllVirtualCatalogs.

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

[Visual Basic]

Example

myProductCatalog.RebuildVirtualCatalog

See Also

[C++]ProductCatalog Object

[Visual Basic]ProductCatalog Object

[C++]ICatalogManager3::RebuildAllVirtualCatalogs

[Visual Basic]CatalogManager.RebuildAllVirtualCatalogs

Copyright © 2005 Microsoft Corporation.
All rights reserved.