IProductCatalog3::AddSpecificationSearchClause Method [C++]
Use this method to add constraints to a specification search of this catalog.
Definition
[C++]
HRESULT IProductCatalog3::AddSpecificationSearchClause(BSTRstrClause,
VARIANT*pstrSearchHandle);
[Visual Basic]
Sub AddSpecificationSearchClause(strClause As String,
pstrSearchHandle As Variant)
Parameters
- strClause[C++]
[in] A BSTR that contains the clause to be added to the specified specification search. - strClause[Visual Basic]
A String that contains the clause to be added to the specified specification search. - pstrSearchHandle[C++]
[in] A VARIANT that contains the state of the specification search to which the clause will be added.
[out] A VARIANT used to return the updated state of the specification search. - pstrSearchHandle[Visual Basic]
A Variant that contains the state of the specification search to which the clause will be added. This variant is also used to return the updated state of the specification search.
Return Values
[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
[Visual Basic] None.
Error Values
[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
The following table describes the custom COM errors this method can return.
Constant | Value | Description |
---|---|---|
E_CAT_INVALID_PARAMETER | [C++] 0x889800B6 [Visual Basic] &H889800B6 |
The input parameter <parameter number> is invalid. |
E_CAT_INVALID_SPECSEARCH_HANDLE | [C++] 0x8898010D [Visual Basic] &H8898010D |
The search handle that you specified is invalid. The search handle should be of the form [CatalogName][CategoryName] AND (Search Clause1) AND (SearchClause2). |
Remarks
[C++] Upon successful completion, the pstrSearchHandle parameter will contain the name of the updated specification search.
The specification clause contained in the strClause parameter will be appended to the existing clauses and sent to SQL Server without any changes when the specification search is performed.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
myProductCatalog.AddSpecificationSearchClause strClause, pstrSearchHandle
See Also
[Visual Basic]ProductCatalog Object
[C++]IProductCatalog3::BeginSpecificationSearch
[Visual Basic]ProductCatalog.BeginSpecificationSearch
[C++]IProductCatalog3::GetSpecificationSearchClauses
[Visual Basic]ProductCatalog.GetSpecificationSearchClauses
[C++]IProductCatalog3::PerformSpecificationSearch
[Visual Basic]ProductCatalog.PerformSpecificationSearch
Copyright © 2005 Microsoft Corporation.
All rights reserved.