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

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define TABLENAME        "table"
  5.  
  6. int main(void)
  7. {
  8.     TABLEHANDLE tblHandle;
  9.     int pxErr;
  10.     char tblName[BUFSIZ];
  11.  
  12.     PXInit();
  13.     PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  14.  
  15.     /* Get the name of the table */
  16.     if ((pxErr = PXTblName(tblHandle, BUFSIZ, tblName)) != PXSUCCESS)
  17.         printf("%s\n", PXErrMsg(pxErr));
  18.     else
  19.         printf("The name of table handle %d is %s\n", tblHandle, tblName);
  20.  
  21.     PXTblClose(tblHandle);
  22.     PXExit();
  23.     return(pxErr);
  24. }
  25.