CTTable::MoveSegment
Moves a key segment to a location.
Declaration
void CTTable::MoveSegment(CTIndex hIndex, NINT segNumber, NINT newIndex);
void CTTable::MoveSegment(NINT indexNumber, NINT segNumber, NINT newIndex);
void CTTAble::MoveSegment(const CTString& indexName, NINT segNumber,
NINT newIndex);
Description
CTTable::MoveSegment() moves a key segment to a location indicated by newIndex.
Return
void
Example
// move the last segment to first
CTIndex hIndex = hTable.GetIndex(0);
NINT count = hIndex.GetSegmentCount();
if (count > 0)
hTable.MoveSegment(hIndex, (count - 1), 0);
See Also
CTIndex::MoveSegment(), CTSegment::MoveSegment()