Product3.GetVariantProperties Method (PIA)
Use this method to retrieve the properties for a specified product variant.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ' for _Recordset
…
Public Function GetVariantProperties(varProductVariantID As Object) As _Recordset
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
using ADODB26Lib; //For _Recordset
…
public _Recordset GetVariantProperties(objectvarProductVariantID);
Parameters
[Visual Basic .NET]
- varProductVariantID
An Object that contains the unique ID of the product variant.
[C#]
- varProductVariantID
An object that contains the unique ID of the product variant.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns a _Recordset interface to a Recordset object that contains the variant properties.
[C#] This method returns a _Recordset interface****to an ADODB26Lib._Recordset object containing the product variant properties.
Exceptions
This method 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_CATALOG_DOESNT_SUPPORT_VARIANTS | [C#] 0x88980032 [Visual Basic .NET] &H88980032 |
This catalog does not support variants. To support variants, the catalog must be created with a variant identifier. |
E_CAT_INVALID_VARIANTID | [C#] 0x8898005C [Visual Basic .NET] &H8898005C |
The value you specified for the VariantID exceeds the maximum allowed length of 256 characters. |
E_CAT_INVALIDVALUE_FOR_VARIANTID | [C#] 0x8898004D [Visual Basic .NET] &H8898004D |
The value you specified for the VariantID is either out of range or does not satisfy the Min/Max condition. |
E_CAT_VC_INVALID_VARIANT_ID | [C#] 0x889800FC [Visual Basic .NET] &H889800FC |
The value you specified for the VariantID exceeds the maximum allowed length of 348 characters. |
E_CAT_VARIANT_DOESNT_EXIST | [C#] 0x8898001F [Visual Basic .NET] &H8898001F |
The product variant you specified does not exist. |
Remarks
The ppRSProductVariant parameter contains valid data only if the property was accessed successfully.
This method returns the properties of the specified product variant. If the product variant specified in the varProductVariantID parameter does not exist in the product, the method will fail.
The single-row Recordset returned contains fields for all of the properties defined for variants of this product followed by the following fields:
Field | Type | Description |
---|---|---|
TimeStamp | Timestamp | None |
cy_list_price | Currency | List price |
oid | Integer | None |
The oid field is for internal use only and should not be updated.
The Recordset returned is updateable, but disconnected. To modify the product properties, pass this Recordset to the SetVariantProperties method.
The returned recordset contains the fields listed in the following table.
Field | Data Type |
---|---|
oid | int |
cy_list_price | money |
Timestamp | timestamp |
ProductID | string |
[Visual Basic .NET]
Example
'vVarID is an Object containing the unique ID of the variant.
rsVariantProps = myProduct.GetVariantProperties(vVarID)
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.