Search Method (SearchClause, SearchOptions)
Executes a unified search for one or more MailingList objects using the specified search options.
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 _
) As DataSet
'Usage
Dim instance As MailingListManager
Dim clause As SearchClause
Dim searchOptions As SearchOptions
Dim returnValue As DataSet
returnValue = instance.Search(clause, _
searchOptions)
public DataSet Search(
SearchClause clause,
SearchOptions searchOptions
)
public:
DataSet^ Search(
SearchClause^ clause,
SearchOptions^ searchOptions
)
public function Search(
clause : SearchClause,
searchOptions : SearchOptions
) : DataSet
Parameters
- clause
Type: Microsoft.CommerceServer..::.SearchClause
A SearchClause containing a search clause or term created by SearchClauseFactory.
- searchOptions
Type: Microsoft.CommerceServer..::.SearchOptions
A SearchOptions containing the search options. Passing nullNothingnullptra null reference (Nothing in Visual Basic) means to use default search options.
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 that 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. |
Remarks
For more information on the default property values for searchOptions, see SearchOptions.
This overload of the Search method searches all types of mailing lists.
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
- 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.