ICategory3::get_DescendantProducts Property [C++]

The DescendantProducts property is a read-only Recordset object that contains all products that exist anywhere below this category. Accessing this property on the root category returns every product in the entire catalog.

Definition

[C++]

HRESULT ICategory3::get_DescendantProducts(VARIANTeClassTypeRequired,
  VARIANTlStartingRecord,
  VARIANTlRecordsToRetrieve,
  VARIANT*plTotalRecordsInQuery,
  _Recordset**DescendantProducts);

[Visual Basic]

Property DescendantProducts(Optional eClassTypeRequired As Variant,
  Optional lStartingRecord As Variant,
  Optional lRecordsToRetrieve As Variant,
  Optional plTotalRecordsInQuery As Variant) As Recordset

Parameters

  • eClassTypeRequired[C++]
    [in, optional] A VARIANT that contains the catalog class wanted. Valid values are from the CatalogClassTypeEnum enumeration. For more information, see the Remarks section.
  • eClassTypeRequired[Visual Basic]
    A Variant that contains the catalog class wanted. Valid values are from the CatalogClassTypeEnum enumeration. For more information, see the Remarks section.
  • lStartingRecord[C++]
    [in, optional] A VARIANT that contains the starting record. A value of one (1) indicates the first record.
  • lStartingRecord[Visual Basic]
    A Variant that contains the starting record. A value of one (1) indicates the first record.
  • lRecordsToRetrieve[C++]
    [in, optional] A VARIANT that contains the number of records to retrieve.
  • lRecordsToRetrieve[Visual Basic]
    A Variant that contains the number of records to retrieve.
  • plTotalRecordsInQuery[C++]
    [out, optional] A pointer to a VARIANT used to return the total number of records in the query.
  • plTotalRecordsInQuery[Visual Basic]
    A Variant used to return the total number of records in the query.
  • DescendantProducts[C++]
    [out, retval] A _Recordset object used to return the descendant products.

[C++]

Return Values

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

Error Values

[C++] This property 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 property 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_INVALID_RS_POINTER

[C++] 0x889800B7

[Visual Basic] &H889800B7

The recordset pointer that you specified is invalid

Remarks

[C++]The DescendantProducts parameter contains valid data only if the property is accessed successfully.

This property gets all the product, variant, or category data (depending on the value passed into the parameter eClassTypeRequired), which are directly or indirectly under this category.

[C++] The returned recordset contains all the fields in the CatalogProduct Recordset.

[Visual Basic] The returned recordset contains all the fields in the CatalogProduct Recordset.

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.

The CatalogClassTypeEnum enumeration values can be combined in the eClassTypeRequired parameter with logical OR operators, so that specifying cscProductClassORcscProductVariantClass 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

[C++]Category Object

[C++]ICategory3::get_RelatedProducts

[C++]ICategory3::get_Products

[Visual Basic]Category Object

[Visual Basic]Category.RelatedProducts

[Visual Basic]Category.Products

Copyright © 2005 Microsoft Corporation.
All rights reserved.