IProductCatalog::SetCatalogAttributes
Use this method to set the attributes of a catalog.
Definition
HRESULT IProductCatalog::SetCatalogAttributes(_Recordset*pRSCatalogAttributes,VARIANTfForceUpdate);
Parameters
pRSCatalogAttributes
[in] A Recordset containing the new attributes.
fForceUpdate
[in, optional] A VARIANT that causes a forced update of the catalog attributes.
Return Values
This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
Error Values
This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT 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_CATALOG_DOESNT_EXIST | 0x88980002 | The catalog did not exist. |
E_CAT_CATALOG_CHANGED | 0x88980012 | The catalog has been updated since it was last read. |
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.
Remarks
Use the GetCatalogAttributes method to get a recordset of the current attributes. After the recordset has been modified, use it as the pRSCatalogAttributes parameter to the SetCatalogAttributes method to write the changes back to the catalog. The timestamps in the recordset will be compared to the timestamps of the attributes being updated for error detection.
The catalog Name, ProductID, CatalogID, and VariantID attributes cannot be changed with this method.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.