Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

SwitchCtree

Switch to a specific c-tree instance.

Short Name

SWTCTREE()

Type

Low-Level function

Declaration

COUNT SwitchCtree(pTEXT regid)

Description

SwitchCtree() makes the instance identified by the supplied registration reference name regid active.

Note: regid is case sensitive and must be exactly the same value previously passed to RegisterCtree.

Return

Value

Symbolic Constant

Explanation

0

NO_ERROR

Instance successfully switched.

516

GNUL_ERR

ctNOGLOBALS not allocated.

517

GNOT_ERR

regid is not registered.

See c-tree Error Codes for a complete listing of valid c-tree error values.

Example

TEXT inpbuf[128] = "myInstance"; /* input buffer */


if (SwitchCtree(inpbuf)) {

ctrt_printf("\nCould not SWITCH to {%s} instance.",inpbuf);

ctrt_exit(2);

}

See also

NextCtree(), RegisterCtree(), WhichCtree(), GetCtreePointer(), UnRegisterCtree()

TOCIndex