C Examples: DbiGetDatabaseDesc

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

C Examples: DbiGetDatabaseDesc

Return to chapter overview

Get database description.

If DBStr is not null, this function also creates a string with the database information. This example uses the following input:
               fDbiGetDatabaseDesc("BDEDEMOS", &DbDesc, Buffer)

DBIResult fDbiGetDatabaseDesc(pCHAR DBName, pDBDesc pDB, pCHAR DBStr)

{

   DBIResult   rslt;

   rslt = Chk(DbiGetDatabaseDesc(DBName, pDB));

   if ((rslt == DBIERR_NONE) && (DBStr != NULL))

      wsprintf(DBStr, "Name: %s, Description: %s, Physical Name: %s, Type: %s",

         pDB->szName, pDB->szText, pDB->szPhyName, pDB->szDbType);

   return rslt;

}