Search Method (Int32)
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Perform a search using the information in the current instance and return the number of records found that match the search criteria.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function Search ( _
<OutAttribute> ByRef totalRecords As Integer _
) As CatalogItemsDataSet
'Usage
Dim instance As CatalogSearch
Dim totalRecords As Integer
Dim returnValue As CatalogItemsDataSet
returnValue = instance.Search(totalRecords)
public CatalogItemsDataSet Search(
out int totalRecords
)
public:
CatalogItemsDataSet^ Search(
[OutAttribute] int% totalRecords
)
public function Search(
totalRecords : int
) : CatalogItemsDataSet
Parameters
- totalRecords
Type: System..::.Int32%
The total number of records to return.
Return Value
Type: Microsoft.CommerceServer.Catalog..::.CatalogItemsDataSet
A CatalogItemsDataSet containing the search results.
Exceptions
Exception | Condition |
---|---|
ValidationException | One of the properties to return is invalid. |
InvalidSearchOptionException | If the search is being performed on multiple catalogs then the PropertiesToReturn should be specified. |
Remarks
Performs the search based on the CatalogSearchOptions and the properties set on the CatalogSearch class and returns a CatalogItemsDataSet containing the search results. If you are searching multiple catalogs then the PropertiesToReturn should be specified. The totalRecords contains the total number of catalog items that matched the search criteria.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.