Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic


UpdateRecordOffsetForKey() searches the specified index for the specified key value and changes its record offset to the specified record offset.

Function Name

NINT UpdateRecordOffsetForKey(FILNO keyno, pVOID target, LONG8 recbyt);


Low-Level file function


  • keyno - The index file number. 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
  • target - The key value whose record offset is to be changed.
  • recbyt8 - The new record offset.

UpdateRecordOffsetForKey() can be used with an index that allows duplicates. Notice that, in the case of duplicates, the target key value must also include the 4-byte or 8-byte record offset at the end of the key because an index that allows duplicates stores the offset as part of the key. As a low-level function, it's most useful for an index that is managed only using low-level functions. Calling UpdateRecordOffsetForKey() on a key whose index has an ISAM-level mapping with a data file (meaning the data and index file were opened at the ISAM level), the function fails with error FMOD_ERR.


NO_ERROR (0) on success, or a non-zero c-tree error code on failure.

If the specified key value doesn't exist in the index, the function returns error INOT_ERR (101).

If the specified index file has an ISAM mapping to a data file, the function returns error FMOD_ERR (48).