C Examples: DbiOpenTableTypesList

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiOpenTableTypesList

Return to chapter overview

Display in a MessageBox all table types supported by a driver:

The following input is used in this example:
fDbiOpenTableTypesList(szPARADOX);

 

DBIResult fDbiOpenTableTypesList(pCHAR Driver)

{

   DBIResult   rslt;

   hDBICur     hTypeCur = 0;

   TBLType     Tbltype;

   CHAR        Buffer[500] = {'\0'};

 

   rslt = Chk(DbiOpenTableTypesList(Driver, &hTypeCur));

   if (rslt != DBIERR_NONE)

      return rslt;

   while (DbiGetNextRecord(hTypeCur, dbiNOLOCK, (pBYTE)&Tbltype, NULL) == DBIERR_NONE)

      wsprintf(Buffer, "%sTable Name: %s, Maximum Record Size: %d\n",

               Buffer, Tbltype.szName, Tbltype.iMaxRecSize);

 

   MessageBox(0, Buffer, Driver, MB_OK);

   return rslt;

}