Previous Topic

Next Topic

Next Active Table

ctdbGetNextActiveTable() retrieves the table handle of the next active table. When no more active tables exist, ctdbGetNextActiveTable() returns NULL.

/* Display all active tables */
void DisplayActiveTables(CTHANDLE hDatabase)
{
   VRLEN hScan;
   CTHANDLE hTable;

   if ((hTable = ctdbGetFirstActiveTable(hDatabase, &hScan)) != NULL) {
      do {
         printf(“Table: %s Path: %s\n”,ctdbGetTableName(hTable),ctdbGetTablePath(hTable));
         hTable = ctdbGetNextActiveTable(hDatabase, &hScan);
         while (hTable != NULL;
   }
}