IProductCatalog::CreateCustomCatalog

Ee797001.c++_off(en-US,CS.10).gifEe797001.vb_on(en-US,CS.10).gif

Use this method to create a new template for a custom catalog.

Definition

HRESULT IProductCatalog::CreateCustomCatalog(BSTRstrCCName,_Recordset**ppRSCustomCat);

Parameters

strCCName

[in] A BSTR that contains the name of the custom catalog to be created.

ppRSCustomCat

[out, retval] A Recordset used to return the properties of the newly created custom catalog.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

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.

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

Constant Value Description
E_CAT_CATALOG_EXISTS 0x88980001 There was already a base catalog with the specified name.

Catalog names and custom catalog names must be unique throughout the Product Catalog System.

E_CAT_CUSTOMCAT_EXISTS 0x88980022 There was already a custom catalog with the specified name.

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.

Remarks

The ppRSCustomCat parameter contains valid data only if the property was accessed successfully.

The following table shows the fields that the returned single-row recordset contains.

Field Data Type Description
CustomCatalogName String
256 characters
The name of the custom catalog.
CatalogName String
256 characters
The name of the base catalog.
CustomCatalogID Integer The field name that uniquely identifies custom catalogs.
TimeStamp Timestamp None.

The returned recordset is disconnected and updateable.

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

See Also

ProductCatalog Object

IProductCatalog::DeleteCustomCatalog

IProductCatalog::GenerateCustomCatalog

IProductCatalog::SetCategoryCustomPrice


All rights reserved.