Partager via


Search Method (SearchClause, SearchOptions, Int32)

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Executes a unified search for PromoCodeDefinition objects using the specified search clause and search options. The total number of returned records are available.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Public Function Search ( _
    clause As SearchClause, _
    searchOptions As SearchOptions, _
    <OutAttribute> ByRef recordsMatched As Integer _
) As DataSet
'Usage
Dim instance As PromoCodeDefinitionManager
Dim clause As SearchClause
Dim searchOptions As SearchOptions
Dim recordsMatched As Integer
Dim returnValue As DataSet

returnValue = instance.Search(clause, _
    searchOptions, recordsMatched)
public DataSet Search(
    SearchClause clause,
    SearchOptions searchOptions,
    out int recordsMatched
)
public:
DataSet^ Search(
    SearchClause^ clause, 
    SearchOptions^ searchOptions, 
    [OutAttribute] int% recordsMatched
)
public function Search(
    clause : SearchClause, 
    searchOptions : SearchOptions, 
    recordsMatched : int
) : DataSet

Parameters

  • recordsMatched
    Type: System..::.Int32%
    Returns the total number of records that matched the given query.

Return Value

Type: System.Data..::.DataSet
A DataSet containing the search results.

Exceptions

Exception Condition
ArgumentException

An operand of the search clause has the wrong data type.

InvalidOperationException

The operator used within a search clause does not support the operand type.

ArgumentNullException

No entity type was specified for the search.

EntityDoesNotExistException

Entity type being searched is not in the list of searchable entities.

SearchRecordsPerPageException

The number of records per page requested is greater than the system configured limit.

SearchPageNumberException

Exception is thrown when a requested page (other than the first page) contains no search result records.

SearchException

The clause does not have a valid XML format.

NotAuthorizedException

The user is not authorized to perform this operation.

Remarks

For more information on the default property values for searchOptions, see SearchOptions.

This method uses the long running SQL command, sqlCommandTimeoutSeconds, of MarketingServices. The long running SQL command time out default is specified in web.config and is normally 120 seconds.

Permissions

See Also

Reference

PromoCodeDefinitionManager Class

PromoCodeDefinitionManager Members

Search Overload

Microsoft.CommerceServer.Marketing Namespace