ProductCatalog3.GetVirtualCatalogRules Method (PIA)
Use this method to return a recordset containing the specified virtual catalog rules.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ' for _Recordset
…
Function GetVirtualCatalogRules(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 GetVirtualCatalogRules( object lStartingRecord,
object lRecordsToRetrieve,
object strPropertyToSortOn,
bool fSortAscending,
object plTotalRecordsInQuery,
);
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. - 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
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. - 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.
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 properties of the object.
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_INVALIDARG | [C#] 0x80070057 [Visual Basic .NET] &H80070057 |
One or more arguments are 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 |
Type | VirtualCatalogRuleTypeEnum Enum | An enumeration that describes the type of rule. See the following table for a description of the values. |
CatalogName | String 90 characters |
The name of the catalog. |
CategoryName | String 128 characters |
The name of the category. |
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 enumeration that indicates the rule types in the returned recordset.
Name | Value | Description |
VCRULETYPE_INCLUDE_PRODUCT | 1 | Indicates an inclusion rule for a product. |
VCRULETYPE_EXCLUDE_PRODUCT | 2 | Indicates an exclusion rule for a product. |
VCRULETYPE_INCLUDE_CATEGORY | 3 | Indicates an inclusion rule for a category. |
VCRULETYPE_EXCLUDE_CATEGORY | 4 | Indicates an exclusion rule for a category. |
VCRULETYPE_INCLUDE_VARIANT | 5 | Indicates an inclusion rule for a variant. |
VCRULETYPE_EXCLUDE_VARIANT | 6 | Indicates an exclusion rule for a variant. |
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.