SearchPurchaseOrders Method (SearchClause, SearchOptions, Int32)

Returns a DataSet containing all the PurchaseOrder objects that match specified search criteria. The number of matched records are available.

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

Syntax

'Declaration
Public Function SearchPurchaseOrders ( _
    searchClause As SearchClause, _
    searchOptions As SearchOptions, _
    <OutAttribute> ByRef recordsMatched As Integer _
) As DataSet
'Usage
Dim instance As PurchaseOrderManager
Dim searchClause As SearchClause
Dim searchOptions As SearchOptions
Dim recordsMatched As Integer
Dim returnValue As DataSet

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

Parameters

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

Return Value

Type: System.Data..::.DataSet
A DataSet containing all the PurchaseOrder objects that match specified search criteria.

Exceptions

Exception Condition
ArgumentNullException

The searchClause is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentNullException

The specified search clause is not a well formed search clause.

NotAuthorizedException

User does not have permission to perform this operation.

TimeoutException

Thrown if an SQL command timeout occurs.

Remarks

The returned DataSet contains just the top level properties from PurchaseOrder class. It contains a DataTable named PurchaseOrder with columns named as properties to return. The DataSet does not contain all the records that match the criteria. It is populated with the pages the user asks for using the searchClause parameter.

In order to perform a SearchPurchaseOrders, the user must have the OrdersAdapter permissions. See Orders System Roles [CS06] for more information about the specific roles in the Order System.

Some order system APIs support distributed transactions. If a cookie with a valid transaction is found the order system enlists as part of that transaction. If a valid transaction is not found the order system initiates a new transaction.

Permissions

See Also

Reference

PurchaseOrderManager Class

PurchaseOrderManager Members

SearchPurchaseOrders Overload

Microsoft.CommerceServer.Orders Namespace