home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 2.ddi / CEXAM.ZIP / RECUNLCK.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  595 b   |  26 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.     LOCKHANDLE lckHandle;
  12.     int pxErr;
  13.  
  14.     PXNetInit(NETDIR,NOTONNET,DEFUSERNAME);
  15.     PXTblOpen(TABLENAME, &tblHandle, 0, 0);
  16.     PXNetRecLock(tblHandle, &lckHandle);
  17.  
  18.     /* Unlock previously locked record */
  19.     if ((pxErr = PXNetRecUnlock(tblHandle, lckHandle)) != PXSUCCESS)
  20.         printf("%s\n", PXErrMsg(pxErr));
  21.  
  22.     PXTblClose(tblHandle);
  23.     PXExit();
  24.     return(pxErr);
  25. }
  26.