Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbGetLastPartition

Retrieves the last partition number of the table.

Declaration

LONG ctdbGetLastPartition(CTHANDLE Handle)

Description

  • ctdbGetLastPartition() returns the last raw partition number for the file if partitions exist. If -1 is returned, 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, ctdbGetLastPartition() returns -1 and ctdbGetError() returns PHST_ERR. ctdbGetError() will return CTDBRET_NOTACTIVE, or CTDBRET_NOTTABLE, if an invalid table handle is passed in.

Returns

ctdbGetLastPartition() returns the last raw partition number or -1 if not found.

See also

ctdbGetFirstPartition()

TOCIndex