ProductCatalog.BeginSpecificationSearch

Ee784510.c++_on(en-US,CS.10).gifEe784510.vb_off(en-US,CS.10).gif

Use this method to initialize a specification search of a catalog.

Definition

Function BeginSpecificationSearch(strCategoryName As String,Optional pRSInitialPropValuesList As Variant,Optional plTotalRecordsAvailable As Variant) As String

Parameters

strCategoryName

A String that contains the name of the category in which to search.

pRSInitialPropValuesList

A Variant used to return the recordset of initial property values.

plTotalRecordsAvailable

A Variant used to return the total records available.

Return Values

If this method completes successfully, it returns a String that contains the state of this specification search.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_CATEGORY_DOESNT_EXIST &H88980041 The category you specified did not exist in the catalog.
E_CAT_CATEGORY_NOT_SEARCHABLE &H88980034 The specified category was not specification searchable.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The optional parameter pRSInitialPropValuesList is a single row recordset. The returned recordset contains one field for each searchable property for the products under the specified category. Each field contains a SAFEARRAY. Each SAFEARRAY contains a set of all the distinct values found in all the products under that category. Only the properties that are marked as searchable are returned in the recordset.

If all the searchable categories contain NULL values then pRSInitialPropValuesList parameter will be set to NULL and the plTotalRecordsAvailable parameter will be 0.

A category can be marked as searchable by setting the IsSearchable property to True.

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

Example

'
strSearchHandle = myProductCatalog.BeginSpecificationSearch(strCategoryName, pRSInitialPropValuesList)

See Also

ProductCatalog Object

ProductCatalog.AddSpecificationSearchClause

ProductCatalog.GetSpecificationSearchClauses

ProductCatalog.PerformSpecificationSearch


All rights reserved.