home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 2.ddi / CEXAM.ZIP / TBLEXIST.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  447 b   |  25 lines

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define TABLENAME        "table"
  5.  
  6. int main(void)
  7. {
  8.     int pxErr;
  9.     int Exist;
  10.  
  11.     PXInit();
  12.  
  13.     /* See if table exists */
  14.     if ((pxErr = PXTblExist(TABLENAME, &Exist)) != PXSUCCESS)
  15.         printf("%s\n", PXErrMsg(pxErr));
  16.     else 
  17.       if (Exist)
  18.         printf("Table exists\n");
  19.       else
  20.         printf("Table does not exist\n");
  21.  
  22.     PXExit();
  23.     return(pxErr);
  24. }
  25.