program TblCopy;
uses PXEngine, WinCrt;

const SourceTable = 'Table1';
      DestTable   = 'Table2';

var   PxErr: Integer;

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

begin
  PX(PXWinInit('MyApp', pxShared));

  (* Copy one table to another *)
  PxErr := PXTblCopy(SourceTable, DestTable);
  if PxErr <> PxSuccess then
    Writeln(PXErrMsg(PxErr));

  PX(PXExit);
end.
