Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTRecord::SetDefaultIndex

Syntax

void SetDefaultIndex(NINT indexno)

void SetDefaultIndex(const CTString& name)

Parameters

  • indexno [in] The new default record index number.
  • name [in] The new default record index name.

Description

Sets the new record default index. Unless this function is called, the first index is the default.

To force a physical data table traversal without using any indexes, specify the following constant:

  • CTDB_DATA_IDXNO

Return

None.

Example


myRecord->SetDefaultIndex("name");

// change the default index to "name"

myRecord->First();

// find the first record ordered by "name"


See also

GetDefaultIndex()

TOCIndex