Category.SetCategoryProperties
Use this method to set values for the properties of this category.
Definition
Sub SetCategoryProperties(pRSCategory As _Recordset,Optional fForceUpdate As Variant)
Parameters
pRSCategory
A Recordset object that contains the properties for this category.
fForceUpdate
A Variant that causes a forced update of the category properties.
Return Values
None.
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 table shows the custom COM errors that this method can return.
Constant | Value | Description |
E_CAT_CATEGORY_CHANGED | &H88980028 | The properties of this category have changed since they were last read. This error is returned only if the fForceUpdate parameter is set to False. |
E_CAT_CATEGORY_DOESNT_EXIST | &H8898001C | This category has been removed from the catalog. |
E_CAT_INVALIDVALUE_FOR_PROPERTY | &H88980038 | This error is returned if:
|
E_CAT_NULL_PRICE_NOT_ALLOWED | &H8898003F | The OriginalPrice field in the pRSCategory recordset was blank or NULL. This field is required if the category is used as a pricing category. |
Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
Use the SetCategoryProperties method to modify the properties of a category. The pRSCategory parameter specifies a Recordset object that describes the new property values for this category. Use the Recordset object returned by the GetCategoryProperties method so that its timestamp can be compared for error checking.
If the fForceUpdate parameter is set to False, and the property values in the*****pRSCategory* parameter have changed, the method will fail.
This method will not update the built in fields in the catalog. If this category is being used as a pricing category, then this method will update the price of all the products using this category as the pricing category
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
myCategory.SetCategoryProperties pRSCategory, "TRUE"