home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a006 / 1.ddi / PASEXAM.ZIP / RECUNLCK.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1991-03-11  |  562 b   |  25 lines

  1. program RecUnlck;
  2. uses PXEngine;
  3.  
  4. const TableName = 'Table';
  5.       NetDir    = '';
  6.       NetType    = NotOnNet ;
  7.  
  8. var   PxErr: Integer;
  9.       TblHandle: TableHandle;
  10.       LckHandle: LockHandle;
  11.  
  12. begin
  13.   PX(PXNetInit(NetDir, NotOnNet , DefUserName));
  14.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  15.   PX(PXNetRecLock(TblHandle, LckHandle));
  16.  
  17.   (* Unlock previously locked record *)
  18.   PxErr := PXNetRecUnlock(TblHandle, LckHandle);
  19.   if PxErr <> PxSuccess then
  20.     Writeln(PxErrMsg(PxErr));
  21.  
  22.   PX(PXTblClose(TblHandle));
  23.   PX(PXExit);
  24. end.
  25.