ProductCatalog.GetCategory

Ee823745.c++_on(en-US,CS.10).gifEe823745.vb_off(en-US,CS.10).gif

Use this method to retrieve the specified category from a catalog.

Definition

Function GetCategory(strCategoryName As String) As Category

Parameters

strCategoryName

A String that contains the name of the category to be returned.

Return Values

If this method completes successfully, it returns the Category object specified.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following standard COM error value has a particular meaning in the context of this method:

S_FALSE

The catalog specified did not exist.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

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

Example

SET oMyCategory = myProductCatalog.GetCategory "Apparel"

See Also

ProductCatalog Object

ProductCatalog.CreateCategory

ProductCatalog.DeleteCategory


All rights reserved.