Category Object [C++]

Use this object to work with relationships between categories and products. You can also use this object to manipulate parent/child relationships for a category.

ProgID:   Dependent (See Remarks for more information)
COM Class Name:   Category
Type Library Name:   Microsoft Commerce 2002 Catalog Type Library
DLL Name:   Catalog.dll
Threading Model:   Both

[C++]

COM Interface Name:   ICategory3
Interface ID Constant:   IID_ICategory3
Header File:   Catalog.h, mspu_guids.h

[C++]

In C++, use the ICategory3 interface to access the properties and methods of the Category object.

Because this object is primarily intended for use within ASP script, access from C++ will not be common.

Methods

[C++]

Method Description
AddChildCategory Adds another specified category as a child of this category.
AddParentCategory Adds another specified category as a parent of this category.
AddProduct Adds another specified product variant as a child of this category.
AddRelationshipToCategory Adds a relationship from another category to this category.
AddRelationshipToProduct Adds a relationship from this category to a specified product.
RemoveChildCategory Removes the specified category as a child of this category.
RemoveParentCategory Removes the specified category as a parent of this category.
RemoveProduct Removes a product from this category.
RemoveRelationshipToCategory Removes the relationship between this category and a specified category.
RemoveRelationshipToProduct Removes the relationship between this category and a specified product.
Search Searches product, variant, and category data within the category, its children, the children of the children,and so on.
SetCategoryProperties Assigns new properties to a category.
SetRelatedCategories Updates category relationships.
SetRelatedProducts Updates product relationships.

[Visual Basic]

Method Description
AddChildCategory Adds another specified category as a child of this category.
AddParentCategory Adds another specified category as a parent of this category.
AddProduct Adds another specified product variant as a child of this category.
AddRelationshipToCategory Adds a relationship from another category to this category.
AddRelationshipToProduct Adds a relationship from this category to a specified product.
RemoveChildCategory Removes the specified category as a child of this category.
RemoveParentCategory Removes the specified category as a parent of this category.
RemoveProduct Removes a product from this category.
RemoveRelationshipToCategory Removes the relationship between this category and a specified category.
RemoveRelationshipToProduct Removes the relationship between this category and a specified product.
Search Searches product, variant, and category data within the category, its children, the children of the children,and so on.
SetCategoryProperties Assigns new properties to a category.
SetRelatedCategories Updates category relationships.
SetRelatedProducts Updates product relationships.

Properties

[C++]

Property Type Description
AncestorCategories _Recordset Contains a recordset of category names that exist anywhere above this category, and that directly or indirectly contain this category in the hierarchy.

This property is read-only.

CatalogName BSTR Contains the name of the catalog of which this Category object is a member.

This property is read-only.

CategoryName BSTR Contains the name of this category.

This property is read-only.

ChildCategories _Recordset Contains a recordset containing the child Category objects for this category.

This property is read-only.

DescendantProducts _Recordset Contains all products that exist anywhere below this category. Accessing this property on the root category returns every product in the entire catalog.

This property is read-only.

GetCategoryProperties _Recordset Contains a recordset containing the property values for this category.

This property is read-only.

ParentCategories _Recordset Contains a recordset containing the names of the Category objects that are parent categories to this category.

This property is read-only.

PrimaryParent BSTR Contains the primary parent category of this category.

This property is read/write.

Products _Recordset Contains the products that exist within this category, but not within descendant categories.

This property is read-only.

RelatedCategories _Recordset Contains a recordset that describes all of the categories and product families that have relationships to this category.

This property is read-only.

RelatedProducts _Recordset Contains a recordset that describes all the product variants and product families that have relationships to this category.

This property is read-only.

[Visual Basic]

Property Type Description
AncestorCategories Recordset Contains a recordset of category names that exist anywhere above this category, and that directly or indirectly contain this category, in the hierarchy.

This property is read-only.

CatalogName String Contains the name of the catalog of which this Category object is a member.

This property is read-only.

CategoryName BSTR Contains the name of this category.

This property is read-only.

ChildCategories Recordset Contains a recordset containing the child Category objects for this category.

This property is read-only.

DescendantProducts Recordset Contains all products that exist anywhere below this category. Accessing this property on the root category returns every product in the entire catalog.

This property is read-only.

GetCategoryProperties Recordset Contains a recordset containing the property values for this category.

This property is read-only.

ParentCategories Recordset Contains a recordset containing the names of the Category objects that are parent categories to this category.

This property is read-only.

PrimaryParent BSTR Contains the primary parent category of this category.

This property is read/write.

Products Recordset Contains the products that exist within this category, but not within descendant categories.

This property is read-only.

RelatedCategories Recordset Contains a recordset that describes all of the categories and product families that have relationships to this category.

This property is read-only.

RelatedProducts Recordset Contains a recordset that describes all the product variants and product families that have relationships to this category.

This property is read-only.

Remarks

[C++]

The Category object is a dependent object. Obtain a pointer to the ICategory interface by calling one of the following methods:

[Visual Basic]

The Category object is a dependent object. Obtain a reference to it by calling one of the following methods:

Copyright © 2005 Microsoft Corporation.
All rights reserved.