Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

ReReadRecord

Reread current ISAM record.

Short Name

RRDREC()

Type

ISAM function

Declaration

COUNT ReReadRecord(FILNO datno, pVOID recptr)

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

ReReadRecord() provides a simple way to reread the current ISAM record for fixed-length data records belonging to data file number datno. The record is read into the record buffer pointed to by recptr. Use ReReadVRecord() to reread the current ISAM record for a variable-length data file, unless only the fixed-length portion of the variable-length record is needed.

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 read of current ISAM record.

33

DNUL_ERR

recptr is NULL. No data file read performed.

42

DLOK_ERR

Could not get lock on data record. No data file read performed.

100

ICUR_ERR

No current ISAM record.

160

ITIM_ERR

Record deleted by another user.

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

Example

FILNO datno;

TEXT buffer[256];


if (LockISAM(ctENABLE) || ReReadRecord(datno,buffer)) {

printf("\nCould not reread record (%d)",isam_err);

LockISAM(ctFREE);

return(-1);

}

See also

ReReadVRecord(), the LOCK discussion of multi-user updates in Multi-User Concepts of the c-tree Programmer’s Reference Guide and the source code of CTIXMG.C.

TOCIndex