Previous Topic

Next Topic

FirstInvRange

Read the first data record in a range

Short Name

FRSVRNG()

Type

ISAM function

Declaration

COUNT FirstInVRange(COUNT keyno, pVOID recptr, pVRLEN plen); 

Description

Read the first data record in a range established by a call to AllocateRange(). If successful, the record becomes the current ISAM record for the associated data file. A successful FirstInVRange() defines a current key value set, and subsequent calls to NextInVRange() or PreviousInVRange() will read the other records in the range.

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

Successful operation.

101

INOT_ERR

Could not satisfy and ISAM search request for index isam_fil. This error frequently indicates "End of File" reached, or "Record not Found."

The following 4 items are the probable causes of the INOT_ERR (101).

  • Passing GetRecord() a duplicate allowed index number (keyno). GetRecord() does not support duplicate allowed indices.
  • Improper target padding. Review “Key Segment Modes” in the c-tree Plus Programmer’s Guide.
  • Not calling TransformKey() on target. Refer to “TransformKey” in the Function Reference Guide
  • Improper segment mode. Review “Key Segment Modes” in the c-tree Plus Programmer’s Guide.

See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values.

See also

AllocateRange(), FreeRange(), FirstInRange(), LastInRange(), LastInVRange, NextInRange(), NextInVRange, PreviousInRange, PreviousInVRange