OrderGroupManager.Find

Ee824771.c++_on(en-US,CS.10).gifEe824771.vb_off(en-US,CS.10).gif

Use this method to perform a SQL search based on the specified SQL clause fragments.

Definition

Function Find(OrderGroupCriteriaArray As Variant,OrderFormCriteriaArray As Variant,LineItemCriteriaArray As Variant,Optional SearchDateTimeColumn As Variant,Optional SearchDateTimeStart As Variant,Optional SearchDateTimeEnd As Variant,Optional StatusFilter As Long,Optional JoinOrderFormInfo As Boolean,Optional JoinLineItemInfo As Boolean,Optional Columns As Variant,Optional OrderGroupSortColumn As Variant,Optional SortDirection As Variant,Optional PageSize As Long,Optional PageNumber As Long,Optional outTotalRecordsFound As Variant) As Variant

Parameters

OrderGroupCriteriaArray

A Variant that contains the SQL clause used to search for a specific set of OrderGroups.

OrderFormCriteriaArray

A Variant that contains the SQL clause used to search for a specific set of OrderForms.

LineItemCriteriaArray

A Variant that contains the SQL clause used to search for a specific set of line items.

SearchDateTimeColumn

A Variant that specifies the DateTime column name to search for; if left null, the DateTime column name does not become part of the search criteria. This parameter is optional.

SearchDateTimeStart

A Variant that specifies the DateTime start value to search for; if left null, the DateTime start value does not become part of the search criteria. This parameter is optional.

SearchDateTimeEnd

A Variant that specifies the DateTime end value to search for; if left null, the DateTime end value does not become part of the search criteria. This parameter is optional.

StatusFilter

A Long that stores the OrderGroup status. This parameter is optional.

JoinOrderFormInfo

A Boolean indicating whether to include the OrderFormHeader table in the results. This parameter is optional.

JoinLineItemInfo

A Boolean indicating whether to include the OrderFormLineItems table in the results. This parameter is optional.

Columns

A Variant that contains the names of the columns to return in addition to the default columns. This parameter is optional.

OrderGroupSortColumn

A Variant that contains the OrderGroup column name to sort on. This parameter is optional.

SortDirection

A Variant that contains the sort direction. This parameter is optional; possible values for this parameter are the SQL strings "ASC" or "DESC".

PageSize

With this method, you can implement a paging mechanism that allows you to page through your orders. (These could be viewed in a list sheet, for example.) The PageSize parameter is a Long that contains the number of line items per page. This parameter setting must be coordinated with the PageNumber parameter. This parameter is optional and has a default value of 20.

PageNumber

With this method, you can implement a paging mechanism that allows you to page through your orders. (These could be viewed in a list sheet, for example.) The PageNumber parameter is a Long that contains the page number to jump to. This parameter setting must be coordinated with the PageSize parameter. This parameter is optional.

outTotalRecordsFound

A Variant that specifies the total number of records found.

Return Values

If this method completes successfully, it returns Variant that contains the recordset containing the result set that meets the search criteria.

Error Values

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.

Remarks

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' vRecordset is a Variant
' vOrderGroupCriteriaArray is a Variant
' vOrderFormCriteriaArray is a Variant
' vLineItemCriteriaArray is a Variant
' oOrderGroupManager is a Commerce OrderGroupManager object
vRecordset = oOrderGroupManager.Find(vOrderGroupCriteriaArray, _
    vOrderFormCriteriaArray, vLineItemCriteriaArray)

See Also

OrderGroupManager Object

OrderGroupManager.SimpleFind


All rights reserved.