Previous Topic

Next Topic

Find Table

ctdbFindTable() locates a specific table given the table name and, if the table exists, retrieves the table path. If a table cannot be found, ctdbFindTable() returns INOT_ERR (101).

/* return YES if table exist or NO if table does not exit */
CTBOOL TableExist(CTHANDLE hDatabase, pTEXT tblName)
{
   TEXT tblPath[MAX_NAME];

   return(ctdbFindTable(hDatabase,TblName,tblPath,sizeof(tblPath))
          == CTDBRET_OK) ? YES : NO;
}