Share via


ProductCatalog3.RemoveSpecificationSearchClause Method (PIA)

Use this method to remove the last constraint from a specified specification search.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Catalog
…
Public Function RemoveSpecificationSearchClause(pstrSearchHandle As Object) As String

[C#]

using Microsoft.CommerceServer.Interop.Catalog;
…
public string RemoveSpecificationSearchClause(ref objectpstrSearchHandle);

Parameters

[Visual Basic .NET]

  • pstrSearchHandle
    An Object that contains the specification search handle from which a constraint is to be removed.

[C#]

  • pstrSearchHandle
    An object that contains the specification search handle from which a constraint is to be removed.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns a String that contains the removed clause.

[C#] This method returns a string containing the removed clause.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

This method always removes the last constraint that was added to the search by using the AddSpecificationSearchClause method. The returned string will be in the same form as the original constraint.

The following table shows the custom COM errors that COMException may wrap as exceptions for this method.

Constant Value Description
E_CAT_INVALID_PARAMETER

[C#] 0x889800B6

[Visual Basic .NET] &H889800B6

The input parameter <parameter number> is invalid.
E_CAT_INVALID_SPECSEARCH_HANDLE

[C#] 0x8898010D

[Visual Basic .NET] &H8898010D

The search handle that you specified is invalid. The search handle should be of the form [CatalogName][CategoryName] AND (Search Clause1) AND (SearchClause2) ....

[Visual Basic .NET]

Example

'strSearchHandle contains a search handle returned 
'from AddSpecificationSearchClause or BeginSpecificationSearch
'strRemovedClause will contain the removed clause after the call returns.
strRemovedClause = myProductCatalog.RemoveSpecificationSearchClause(strSearchHandle)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Catalog

Platforms: Windows 2000, Windows Server 2003

Assembly: cataloglib (in cataloglib.dll)

See Also

ProductCatalog3 Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.