Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

ctdbGetVTableInfoFromTable

ctdbGetVTableInfoFromTable() lists virtual tables defined in a host file.

Declaration

VOID ctdbGetVTableInfoFromTable(pCTDBVTABLEINFO VtableRes)

Description

There may be a need to list the virtual tables defined in a host file without looking at the c-treeDB database dictionary (for example, the dictionary is missing). This information can be reconstructed with this function.

  • pCTDBVTABLEINFO VtableRes: a pre-allocated structure (using ctdbAllocVTableInfo()) to contain information retrieved from the table resources.
    • VtableRes->hTable: the host table handle (pCTDBTABLE)
    • VtableRes->data: an array of tagVTABLEOBJ
      • data->id: the virtual table number (UCOUNT)
      • data->type: the virtual table type (VTABLE_TYPE)
      • data->name: the virtual table name (pTEXT) (when applies)
    • VtableRes->data_elements: the maximum number of elements data could contain (UCOUNT)
    • VtableRes->actual_elements: the actual number of elements set in data (UCOUNT)

The hTable and data_elements fields are populated by ctdbAllocVTableInfo(). data and actual_elements are populated by ctdbGetVTableInfoFromTable().

Note: ctdbFreeVTableInfo() should be used in order to properly free memory allocated for CTDBVTABLEINFO.

Return Values

ctdbGetVTableInfoFromTable() does not return a value.

See Also

ctdbAddMRTTable(), ctdbAddVTableResource(), ctdbAllocVTableInfo(), ctdbCreateMRTTable(), ctdbFreeVTableInfo(), ctdbGetVTableNumber(), ctdbIsVTable(), ctdbRemoveVTableResource(), ctdbSetMRTTableFilter()

TOCIndex