Share via


ICategory::get_Products

Ee798443.c++_off(en-US,CS.10).gifEe798443.vb_on(en-US,CS.10).gif

The Products property is a read-only recordset that contains product data for all of the products that exist directly within this category.

Definition

HRESULT ICategory::get_Products(VARIANTeClassTypeRequired,VARIANTstrPropertyToSortOn,VARIANTlStartingRecord,VARIANTlRecordsToRetrieve,VARIANT*plTotalRecordsInQuery,_Recordset**Products);

Parameters

eClassTypeRequired

[in, optional] A VARIANT that contains the catalog class desired. Valid values are from the CatalogClassTypeEnum enumeration. For more information, see the Remarks section.

strPropertyToSortOn

[in, optional] A VARIANT that contains the property to sort on.

lStartingRecord

[in, optional] A VARIANT that contains the starting record number.

lRecordsToRetrieve

[in, optional] A VARIANT that contains the number of records to retrieve.

plTotalRecordsInQuery

[out, optional] A pointer to a VARIANT used to return the total number of records in the query.

Products

[out, retval] A _Recordset object used to return the products.

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 Products parameter contains valid data only if the property is accessed successfully.

If the properties specified in strPropertyToSortOn parameter are invalid then the recordset will be unsorted.

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

  • If the value of cscCategoryClass is specified for the eClassTypeRequired parameter, the returned recordset will contain all the products and all the child categories in this category.

The Products property contains the product data for all the products in this category.

The returned recordset contains all the fields in the CatalogProduct Recordset.

If this category contains no products, then the Products property returns an empty recordset whose EOF property is set to VARIANT_TRUE.

The following table shows the values of the CatalogClassTypeEnum enumeration, their associated names, and describes their use.

Name Value Description
cscCategoryClass 1 Requests category data.
cscProductVariantClass 2 Requests product variant data.
cscProductClass 4 Requests product data.
cscProductFamilyClass 8 Requests product family data.
cscProductFamilyForVariantsClass 16 Requests family for variant data, which means the product family of a product variant is being requested.
CscProductVariantsForFamily 32 Requests variants for family data, which means that all of the product variants for a product family are being requested.

CatalogClassTypeEnum values can be combined in the eClassTypeRequired parameter with logical OR operators, so that specifying cscProductClass OR cscProductVariantClass will return both product and product variant data.

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

See Also

Category Object

ICategory::get_DescendantProducts

ICategory::get_RelatedProducts


All rights reserved.