PreviousVRecord
Read the previous variable-length data record in the data file.
Short Name
PRVVREC()
Type
ISAM function
Declaration
COUNT PreviousVRecord(FILNO filno, pVOID recptr, pVRLEN plen)
Description
In V12 the file number typedef was formally changed from COUNT, a two-byte value to FILNO, a four-byte value. Refer to this link for compatibility details. Four Byte File Numbering
PreviousVRecord() is identical to it’s fixed-length counterpart, PreviousRecord(), except that it reads the previous variable-length data record. If successful, this record becomes the current ISAM record for the associated data file.
plen acts as both an input and output parameter:
Read the function description for PreviousRecord() for additional important information.
As of c-tree V8.14, c-tree sets the current ISAM position after a record is added such that the next or previous record can be read without having to re-read the record just added. Prior to V8.14, the current ISAM position was not set to a newly-added record and an INOT_ERR (101) error would result if you tried to read either the next or previous record.
Return
Value |
Symbolic Constant |
Explanation |
---|---|---|
0 |
NO_ERROR |
Successful retrieval of current ISAM record. |
633 |
NPLN_ERR |
plen is NULL. |
634 |
NLEN_ERR |
plen is negative on input. |
See c-tree Error Codes for a complete listing of valid c-tree error values.
See also
PreviousRecord(), NextVRecord(), TransformKey()