program TblChged;
uses PXEngine, WinCrt, WinTypes;

const TableName = 'Table';

var   PxErr: Integer;
      TblHandle: TableHandle;
      Changed: Bool;

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

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

  (* See if table has been changed *)
  PxErr := PXNetTblChanged(TblHandle, Changed);
  if PxErr <> PxSuccess then
    Writeln(PxErrMsg(PxErr))
  else Writeln('Table has Changed: ', Changed);

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