Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTRecord::SwitchContext

Force a c-tree Plus ISAM context switch.

Declaration

void CTRecord::SwitchContext()

Description

Force a switch to the c-tree Plus ISAM context indicated by the record object. Each record object has its own c-tree ISAM context id.

When most c-treeDB record handling functions are called, they automatically perform a c-tree ISAM context switch. SwitchContext() may be useful before calling specific c-tree ISAM or low level calls to make sure the correct ISAM context is active before making those calls.

Return

Value

Symbolic Constant

Explanation

none

 

SwitchContext return no value.

See "c-tree Plus Error Codes" in c-tree Plus Programmer’s Reference Guide for a complete listing of valid c-tree Plus error values.

EXAMPLE


// force a context switch

hRecord.SwitchContext();

// call ResetRecord

if (ResetRecord((COUNT)hTable.GetDatno(), SWTCURI))

printf("ResetRecord failed\n");

See also

CTBase::SwitchInstance(), CTTable::GetDatno(), CTTable::GetIdxno(), CTIndex::GetIdxno()

TOCIndex