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

  1. program BufEmpty;
  2. uses PXEngine;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       RecHandle: RecordHandle;
  9.  
  10. begin
  11.   PX(PXInit);
  12.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  13.   PX(PXRecBufOpen(TblHandle, RecHandle));
  14.  
  15.   (* Empty the current record and update *)
  16.   PxErr := PXRecBufEmpty(RecHandle);
  17.   if PxErr <> PxSuccess then
  18.     Writeln(PxErrMsg(PxErr))
  19.   else PX(PXRecUpdate(TblHandle, RecHandle));
  20.  
  21.   PX(PXRecBufClose(RecHandle));
  22.   PX(PXTblClose(TblHandle));
  23.   PX(PXExit);
  24. end.
  25.