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