Share via


ProductCatalog3.BeginSpecificationSearch Method (PIA)

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

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Function BeginSpecificationSearch(strCategoryName As String,
  Optional pRSInitialPropValuesList As Object,
  Optional plTotalRecordsAvailable As Object) As String

[C#]

using Microsoft.CommerceServer.Interop.Catalog;
…
public string BeginSpecificationSearch(stringstrCategoryName,
  ref objectpRSInitialPropValuesList,
  ref objectplTotalRecordsAvailable);

Parameters

[Visual Basic .NET]

  • strCategoryName
    A String that contains the name of the category in which to search.
  • pRSInitialPropValuesList
    An Object used to return the recordset of initial property values.
  • plTotalRecordsAvailable
    An Object used to return the total records available.

[C#]

  • strCategoryName
    A string that contains the name of the category in which to search.
  • pRSInitialPropValuesList
    An object used to return the Recordset of initial property values. Set the object to Type.Missing if the returned Recordset is not needed.
  • plTotalRecordsAvailable
    An object used to return the total records available. Set the object to Type.Missing if the returned count is not needed.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns a String that contains the state of this specification search.

[C#] This method returns the state of the specification search as a string.

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_POINTER

[C#] 0x80004003

[Visual Basic .NET] &H80004003

The pointer is invalid.
E_INVALIDARG

[C#] 0x80070057

[Visual Basic .NET] &H80070057

One or more arguments are invalid
E_CAT_INVALID_RETURN_PROPS

[C#] 0x8898011D

[Visual Basic .NET] &H8898011D

The properties that you specified to return are invalid. Properties that contain a space should be enclosed in square brackets. Properties should not contain [ or ] and /* or -- in property names.
E_CAT_INVALID_CATEG_LENGTH

[C#] 0x88980047

[Visual Basic .NET] &H88980047

The category name you specified is either blank or exceeds the maximum allowed length of 128 characters or cannot be converted to a string.
E_CAT_VC_INVALID_PROD_ID_OR_CATEGORY_NAME

[C#] 0x889800FB

[Visual Basic .NET] &H889800FB

The value you specified for the ProductID or CategoryName exceeds the maximum allowed length of 348 characters.
E_CAT_CATEGORY_NOT_EXISTS_NOT_SEARCHABLE

[C#] 0x88980049

[Visual Basic .NET] &H88980049

The category you specified does not exist or is not marked as specification searchable.

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 System.Array. Each System.Array 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 properties 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.

[Visual Basic .NET]

Example

'
strSearchHandle = myProductCatalog.BeginSpecificationSearch(strCategoryName, pRSInitialPropValuesList)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: cataloglib (in cataloglib.dll)

See Also

ProductCatalog3 Class

ProductCatalog3.AddSpecificationSearchClause

ProductCatalog3.GetSpecificationSearchClauses

ProductCatalog3.PerformSpecificationSearch

Copyright © 2005 Microsoft Corporation.
All rights reserved.