program RecUpdat;
uses PXEngine, WinCrt;

const TableName = 'Table';

var   PxErr: Integer;
      TblHandle: TableHandle;
      RecHandle: RecordHandle;

procedure PX(Code : integer);
begin
  writeln(PXErrMsg(Code));
end;

begin
  PX(PXWinInit('MyApp', pxShared));
  PX(PXTblOpen(TableName, TblHandle, 0, False));
  PX(PXRecBufOpen(TblHandle, RecHandle));

  (* Update the current record *)
  PxErr := PXRecUpdate(RecHandle, TblHandle);
  if PxErr <> PxSuccess then
    Writeln(PxErrMsg(PxErr));

  PX(PXRecBufClose(RecHandle));
  PX(PXTblClose(TblHandle));
  PX(PXExit);
end.
