IProduct::get_Variants

Ee810893.c++_off(en-US,CS.10).gifEe810893.vb_on(en-US,CS.10).gif

The Variants property is a read-only recordset that describes all of the variants of this product.

Definition

HRESULT IProduct::get_Variants(VARIANTstrPropertyToSortOn,_Recordset**Variants);

Parameters

strPropertyToSortOn

[in, optional] A VARIANT that contains the property on which the returned Recordset object is to be sorted.

Variants

[out, retval] A pointer to a _Recordset object used to return the variants.

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 standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. 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

The Variants parameter contains valid data only if the property was accessed successfully.

If this product has no variants, the returned recordset will be empty, and its EOF property will be set to VARIANT_TRUE.

The recordset returned contains fields for all of the properties defined for variants of this product and the following fields:

Field Type Description
TimeStamp Timestamp None
cy_list_price Currency List price
<defined variant ID> Varies None

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

See Also

Product Object


All rights reserved.