IProductCatalog::get_RootCategories

Ee823559.c++_off(en-US,CS.10).gifEe823559.vb_on(en-US,CS.10).gif

The RootCategories property is a read-only recordset that contains the names of the categories that exist at the root level of this catalog.

Definition

HRESULT IProductCatalog::get_RootCategories(VARIANTvrPropertiesRequired,_Recordset**RootCategories);

Parameters

vrPropertiesRequired

[in,optional] A VARIANT, subtype String, that contains a comma-separated list of the required property names.

RootCategories

[out, retval] A Recordset used to return the root categories.

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 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.

Remarks

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

Any category without parents is considered to be a root category.

The Recordset object returned by this method will contain one row for each root category, and a field for each property name in the vrPropertiesRequired parameter. If the parameter is omitted, the Recordset object will contain all of the corresponding fields. For more information about these fields, see CatalogProduct Recordset.

Ee823559.note(en-US,CS.10).gif Note

  • Leading numbers in the property names in the vrPropertiesRequired parameter will be trimmed from the corresponding field names in the returned recordset. The data will be correct; only the field names will be incorrect. If the property is omitted, then the field names will be correct. Enclose field names that begin with a number in brackets to avoid this problem. For example, oProductCatalog.RootCategories("[123_Prop1],[123_ Prop2]").

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

See Also

ProductCatalog Object

IProductCatalog::get_RootProducts


All rights reserved.