CTRecord::RangeOn
Establish a new index range on a record handle.
Declaration
void CTRecord::RangeOn(NINT SegCount, pVOID lRange, pVOID uRange, pNINT operators)
Description
CTRecord::RangeOn() establishes a new range based on the key segment values passed on lRange and uRange buffers, and the operators for each segment. Once the range is set, use CTRecord::First(), CTRecord::Next(), CTRecord::Prev() and CTRecord::Last() to navigate the records in the specified range. The range is set for all index entries that are situated between the lower bounds and upper bounds values. The segment values are stored in lRange and uRange buffers in the same order and type of the index segment definition. If a previous range exists for this index, the previous range is released and the new range is established. Ranges take precedence over sets. If a record handle has a set established, record from a range will fetched instead of records from a range. Once the range is terminated, the records from a set is established.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
CTDBRET_OK |
CTRecord::RangeOn() returns CTDBRET_OK on success or c-treeDB SDK error code on failure. |
See "c-treeDB Errors and Return Values" for a complete listing of valid c-treeDB error codes and return values.
See also
CTRecord::RangeOff(), CTRecord:IsRangeOn()