Product Documentation

FairCom DB API API for C++ - Developers Guide

Previous Topic

Next Topic

ROWID index

Two indexes are created by default during the table creation: the ROWID and RECBYT indexes.

The ROWID index, formed by a field and an associated index, holds the auto increment value generated automatically by c-tree every time a new record is added to the table.

When a table is created with ROWID support, a ROWID index is automatically created for the table. The operation of the ROWID index is transparent to the FairCom DB API user. FairCom DB API will automatically update the index entries. The ROWID index will not appear in the list of indexes for a table. The user cannot alter or delete the components of the ROWID index.

Functions that deal with the ROWID index are:

  • CTTable::HasRowid() - to determine if the table has ROWID support;
  • CTRecord::GetRowid() - to retrieve the ROWID for a given record;
  • CTRecord::FindRowid() - to locate and retrieve a record, given the ROWID.

By default, all FairCom DB API created tables have support for the ROWID index. If, for any reason, a table should be created without support for this index, the create mode CTCREATE_NOROWID should be added in CTTable:Create() method.

TOCIndex