program TblRen;
uses PXEngine, WinCrt;

const OldName = 'OldTbl';
      NewName = 'NewTbl';

var   PxErr: Integer;

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

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

  (* Rename a table *)
  PxErr := PXTblRename(OldName, NewName);
  if PxErr <> PxSuccess then
    Writeln(PxErrMsg(PxErr));

  PX(PXExit);
end.
