Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbGetFirstPartition

Retrieves the first partition number of the table.

Declaration

LONG ctdbGetFirstPartition(CTHANDLE Handle)

Description

  • ctdbGetFirstPartition() returns the first 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, ctdbGetFirstPartition() returns -1 and ctdbGetError() returns PHST_ERR. ctdbGetError() will return CTDBRET_NOTACTIVE, or CTDBRET_NOTTABLE, if an invalid table handle is passed in.

Returns

ctdbGetFirstPartition() returns the first raw partition number or -1 if not found.

See also

ctdbGetLastPartition()

TOCIndex