Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic


Find a record based on its rowid.


CTDBRET ctdbFindRowid(CTHANDLE Handle, CTROWID rowid,



ctdbFindRowid() retrieves the record, given its rowid. The record data is retrieved from disk into the record handle’s record buffer and the current record is set to that record. Note that if session-wide record locking is enabled, this function will also lock the record it retrieves.

  • Handle [in] the record handle.
  • rowid [in] the rowid value.
  • FindMode [in] the mode to use to look for the record in the table. The find modes are listed in c-treeDB API definitions.

Note: The FindMode CTFIND_EQ requires that the target contains values for all segments that compose the index and the index cannot allow duplicates.


ctdbFindRowid() returns CTDBRET_OK on success, or INOT_ERR (101) if no record is found with the specified rowid. Any other return value indicates an error condition (c-treeDB API error).

See also

ctdbAllocRecord(), ctdbGetRowid(), ctdbHasRowid()