Product3.Variants Property (PIA)
The Variants property is a Recordset that describes all of the variants of this product.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ' for _Recordset
…
Public Property Variants(Optional strPropertyToSortOn As Object) As _Recordset
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
using ADODB26Lib; //For _Recordset
…
public _Recordset get_Variants(objectstrPropertyToSortOn );
Parameters
[Visual Basic .NET]
- strPropertyToSortOn
An Object that contains the property on which the returned Recordset object is to be sorted.
[C#]
- strPropertyToSortOn
An object that contains the property on which the returned Recordset object is to be sorted. Set to Type.Missing to not specify a property on which to sort.
[C#]
Return Values
This property returns a _Recordset interface****to an ADODB26Lib._Recordset object containing the variants.
Exceptions
This property may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
The following table shows the custom COM errors that a COMException can wrap.
Constant | Value | Description |
---|---|---|
E_CAT_INVALID_RS_POINTER | [C#] 0x889800B7 [Visual Basic .NET] &H889800B7 |
The recordset pointer that you specified is invalid. |
E_CAT_INVALID_SORT_PROPS | [C#] 0x8898011E [Visual Basic .NET] &H8898011E |
The properties to sort that you specified are invalid. Properties that contain a space should be enclosed in square brackets. Properties should not contain [ or ] and /* or -- in property names. |
Remarks
If this product has no variants, the returned Recordset will be empty, and its EOF property will be set to 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 |
[C#]get_Variants does not show up in IntelliSense.
[Visual Basic .NET]
Example
rsVariants = myProduct.Variants("Size")
Requirements
Namespace: Microsoft.CommerceServer.Interop.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: Cataloglib (in Cataloglib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.