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

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