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

  1. #include <stdio.h>
  2. #include "pxengine.h"
  3.  
  4. #define TABLENAME        "table"
  5. #define NETDIR           ""
  6. #define NETTYPE          NOTONNET
  7.  
  8. int main(void)
  9. {
  10.     TABLEHANDLE tblHandle;
  11.     int pxErr;
  12.     int Locked;
  13.  
  14.     PXNetInit(NETDIR,NETTYPE,DEFUSERNAME);
  15.     PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  16.  
  17.     /* See if record is locked */
  18.     if ((pxErr = PXNetRecLocked(tblHandle, &Locked)) != PXSUCCESS)
  19.         printf("%s\n", PXErrMsg(pxErr));
  20.     else
  21.         printf("Record is %s\n", Locked ? "locked" : "unlocked");
  22.  
  23.     PXTblClose(tblHandle);
  24.     PXExit();
  25.     return(pxErr);
  26. }
  27.