_OrderGroupManager::Find

Ee810296.c++_off(en-US,CS.10).gifEe810296.vb_on(en-US,CS.10).gif

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

Definition

HRESULT _OrderGroupManager::Find(VARIANTOrderGroupCriteriaArray,VARIANTOrderFormCriteriaArray,VARIANTLineItemCriteriaArray,VARIANTSearchDateTimeColumn,VARIANTSearchDateTimeStart,VARIANTSearchDateTimeEnd,longStatusFilter,VARIANT_BOOLJoinOrderFormInfo,VARIANT_BOOLJoinLineItemInfo,VARIANTColumns,VARIANTOrderGroupSortColumn,VARIANTSortDirection,longPageSize,longPageNumber,VARIANT*outTotalRecordsFound,VARIANT*vtResults);

Parameters

OrderGroupCriteriaArray

[in] A VARIANT that contains the SQL clause used to search for a specific set of OrderGroups.

OrderFormCriteriaArray

[in] A VARIANT that contains the SQL clause used to search for a specific set of orderforms.

LineItemCriteriaArray

[in] A VARIANT that contains the SQL clause used to search for a specific set of line items.

SearchDateTimeColumn

[in, optional] 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.

SearchDateTimeStart

[in, optional] 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.

SearchDateTimeEnd

[in, optional] 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.

StatusFilter

[in, optional, defaultvalue (0)] A long that stores the OrderGroup status.

JoinOrderFormInfo

[in, optional, defaultvalue (0)] A VARIANT_BOOL indicating whether to include the OrderFormHeader table in the results.

JoinLineItemInfo

[in, optional, defaultvalue (0)] A VARIANT_BOOL indicating whether to include the OrderFormLineItems table in the results.

Columns

[in, optional] A VARIANT that contains the names of the columns to return in addition to the default columns.

OrderGroupSortColumn

[in, optional] A VARIANT that contains the OrderGroup column name to sort on.

SortDirection

[in, optional] A VARIANT that contains the sort direction. This parameter is optional; possible values for this parameter are the SQL strings "ASC" or "DESC".

PageSize

[in, optional, defaultvalue (20)] 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.

PageNumber

[in, optional, defaultvalue (1)] 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.

outTotalRecordsFound

[out] A pointer to a VARIANT that specifies the total number of records found.

vtResults

[out, retval] A pointer to a VARIANT used to return the recordset containing the result set that meets the search criteria.

Return Values

This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

The vtResults parameter points to valid data only if the method completes successfully.

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

See Also

OrderGroupManager Object

_OrderGroupManager::SimpleFind


All rights reserved.