ProductCatalog3.GetPriceRules Method (PIA)
Use this method to get a Recordset containing the specified price rules.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ' for _Recordset
…
Public Function GetPriceRules(Optional lStartingRecord As Object,
Optional lRecordsToRetrieve As Object,
Optional strPropertyToSortOn As Object,
Optional fSortAscending As Boolean,
Optional plTotalRecordsInQuery As Object) As _Recordset
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
using ADODB26Lib; //For _Recordset
…
public _Recordset GetPriceRules( objectlStartingRecord,
objectlRecordsToRetrieve,
objectstrPropertyToSortOn,
boolfSortAscending,
objectplTotalRecordsInQuery,
);
Parameters
[Visual Basic .NET]
- lStartingRecord
An Object that contains the starting record number. A value of one (1) indicates the first record. If the starting record number is not specified, then this method starts with record one (1). - lRecordsToRetrieve
An Object that contains the number of records to retrieve. - strPropertyToSortOn
An Object that contains the property on which to sort. This must be a property in the returned recordset. If not included, the returned recordset will be unsorted. - fSortAscending
A Boolean that specifies whether to sort in ascending or descending order. A value of True (-1) indicates to sort in ascending order. A value of False (0) indicates to sort in descending order. The default value is True. - plTotalRecordsInQuery
An Object that, if supplied, contains on output the total number of records.
[C#]
- lStartingRecord
A Variant that contains the starting record number. A value of one (1) indicates the first record. If the starting record number is not specified, then this method starts with record one (1). - lRecordsToRetrieve
A Variant that contains the number of records to retrieve. - strPropertyToSortOn
A Variant that contains the property on which to sort. This must be a property in the returned recordset. If not included, the returned recordset will be unsorted. - fSortAscending
A Boolean that specifies whether to sort in ascending or descending order. A value of True (-1) indicates to sort in ascending order. A value of False (0) indicates to sort in descending order. The default value is True. - plTotalRecordsInQuery
A Variant that, if supplied, contains on output the total number of records.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns a _Recordset interface to a Recordset that contains the properties for the object.
[C#] This method returns a _Recordset interface to a Recordset object used to return the product variant.
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 COMException may wrap as exceptions for this method.
Constant | Value | Description |
---|---|---|
E_CAT_VC_NOT_A_VIRTUAL_CATALOG | [C#] 0x889800FA [Visual Basic .NET] &H889800FA |
Invalid catalog type. This API can only be called on a virtual catalog. |
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 that you specified to sort are invalid. Properties that contain a space should be enclosed in square brackets. Properties should not contain [ or ] and /* or -- in property names. |
Remarks
The returned recordset is disconnected and updateable. The following table shows the fields that the returned recordset contains.
Field | Data Type | Description |
AdjustmentType | CatalogCustomPriceEnum enumeration | The type of the pricing rule. |
Amount | Integer | None |
CategoryName | String 85 characters |
None |
ProductID | String 256 characters |
The field name that uniquely identifies products. |
VariantID | String 256 characters |
The field name that uniquely identifies variants. |
The following table shows the values of the CatalogCustomPriceEnum enumeration, their associated names, and describes their use.
Name | Value | Description |
---|---|---|
cscNoCustomPrice | 0 | The custom price is the same as the base price. |
cscPercentageMultiplier | 1 | The custom price = basePrice + (basePrice * pfpCustomPriceAmount /100). |
cscAddFixedAmount | 2 | The custom price is the value in the parameter pfpCustomPriceAmount added to the base price. |
cscReplacePrice | 3 | The custom price is the value in the parameter pfpCustomPriceAmount. |
cscInvalidCustomPrice | -1 | Reserved for future use. |
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
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.