Share via


Category.GetProducts (CatalogSearchOptions, Boolean, Int32) Method (BCL)

Use this method to get the properties for the products in this category using the searchOptions parameter to determine how the results are returned. If the recursive value is true, the products in child categories of this product are also returned. As well, the products in grandchild categories, in great-grandchild categories, and so on, are all returned.

Definition

[Visual Basic .NET]

Overridable Public Function GetProducts( _ByValsearchOptions As CatalogSearchOptions, _
  ByValrecursive As System.Boolean, _
  ByReftotalRecords As System.Int32 _
) As System.Data.DataSet

[C#]

public virtual System.Data.DataSet GetProducts(CatalogSearchOptionssearchOptions,
  System.Booleanrecursive,
  out System.Int32totalRecords);

Parameters

[Visual Basic .NET]

  • searchOptions
    A CatalogSearchOptions object specifies how the data is to be returned. This value may be NULL.
  • recursive
    A System.Boolean that indicates whether the search is recursive. A value of true indicates that the search is recursive.
  • totalRecords
    An integer containing the total number of products returned by the query.

[C#]

  • searchOptions
    A CatalogSearchOptions object specifies how the data is to be returned. This value may be NULL.
  • recursive
    A System.Boolean that indicates whether the search is recursive. A value of true indicates that the search is recursive.
  • totalRecords
    An integer containing the total number of products returned by the query.

Return Value

A DataSet with a single DataTable that contains the product properties.

Remarks

Calling the GetProducts method is more efficient than calling any of the GetProducts methods with parameters.

Throws a CatalogException on failure.

Because this method internally calls the Category.Search method, some error messages will report that the Search method has failed even though the Search method was not explicitly called.

Requirements

Namespace: Microsoft.CommerceServer.Runtime.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: Microsoft.CommerceServer.Runtime.dll

Copyright © 2005 Microsoft Corporation.
All rights reserved.