ProductCatalog.GetProductVariant
Use this method to retrieve the properties of a specified product variant.
Definition
Function GetProductVariant(varProductID As Variant,varVariantID As Variant) As _Recordset
Parameters
varProductID
A Variant that contains the unique identifier of the product family.
varVariantID
A Variant that contains the unique identifier of the product variant.
Return Values
If this method completes successfully, it returns a recordset that contains the properties of the specified variant.
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_CATALOG_DOESNT_SUPPORT_VARIANTS | &H88980032 | This catalog does not support variants. This is determined when the catalog is created and cannot be changed. |
Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
A single row recordset with all the properties of the variant is returned. The fields of the returned recordset are determined by the properties associated with the definition on which it is based. Both the product properties and the variant properties are returned.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
SET rsVariantProps = myProductCatalog.GetProductVariant("SKU4007", "Blue")