cwbDQ_SetSearchOrder

Purpose

Set the search order of the open attributes. The default is no search order. If the cwbDQ_SetKey API is called, the search order is changed to equal. Use this API to set it to something else. The search order is used when reading or peeking a keyed data queue to identify the relationship between the key of the record to retrieve and the key value specified on the cwbDQ_SetKey API. If the data queue order attribute is not CWBDQ_SEQ_KEYED, this property is ignored.

Syntax

 
unsigned int CWB_ENTRY cwbDQ_SetSearchOrder(
                             cwbDQ_Data          data,
                             unsigned short      searchOrder);

Parameters

cwbDQ_Data data - input
Handle of the data object that was returned by a previous call to cwbDQ_CreateData.
unsigned short searchOrder - input
Order to use when reading from a keyed queue. Possible values are:
  • CWBDQ_NONE
  • CWBDQ_EQUAL
  • CWBDQ_NOT_EQUAL
  • CWBDQ_GT_OR_EQUAL
  • CWBDQ_GREATER
  • CWBDQ_LT_OR_EQUAL
  • CWBDQ_LESS

Return Codes

The following list shows common return values.

CWB_OK
Successful completion.
CWBDQ_INVALID_DATA_HANDLE
Invalid data handle.
CWBDQ_INVALID_SEARCH
Invalid search order.

Usage

None