Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

c-treeDB Methods to Retrieve Partitions

Additional methods have been added to the c-treeDB .NET API CTTable class to support retrieving the first (oldest) and last (newest) partition members.

c-treeDB .NET API

LONG CTTable.GetFirstPartition()

LONG CTTable.GetLastPartition()

These methods return the partition rawno value of the partition member, which can then be used to purge or otherwise administer the partition member directly. A CTException is thrown if an error occurs and the specific c-treeACE error code should be examined from that.

This support is rooted in the c-treeDB API with the following additions.

c-treeDB C API

LONG ctdbGetFirstPartition(CTHANDLE Handle)

LONG ctdbGetLastPartition(CTHANDLE Handle)

Returns the rawno of the first or last partition for the file if partitions exist. If returns -1, call ctdbGetError() to retrieve the ISAM error code. If this value is zero, the file has no active partitions. If uerr_cod is non-zero, an error occurred. For example, if the specified file number does not correspond to a partition host file, ctdbGetFirstPartition() returns -1 and ctdbGetError() returns error PHST_ERR (713). ctdbGetError() will return CTDBRET_NOTACTIVE, or CTDBRET_NOTTABLE, if an invalid table handle is passed in.

c-treeDB C++ API

LONG CTTable::GetFirstPartition()

LONG CTTable::GetLastPartition()

Returns the partition rawno value of the partition member. A CTException is thrown if an error occurs.

TOCIndex