TPS Repair

Fix Clarion Error 47 after an application update

A new version of your Clarion application may report Error 47: Invalid Record Declaration because it expects a different TPS file structure. TPS Repair can convert your existing files to the structure declared by the new application.

Update the data folder

Close the application and keep a backup of the data folder. Open TpsRep.exe and add any owner passwords the files need.

  1. Press Folder... next to File or folder to process and select the application's data folder.
  2. Press File... next to File structure (optional) and select the new version's EXE or DLL.
  3. Press Repair.

Select the file that contains the table declarations. If they are in a DLL, select that DLL. One EXE or DLL can describe all the TPS files in the folder. Subfolders are not processed.

TPS Repair reads each file's existing structure, converts its records and builds a new file with the selected structure. It verifies the rebuilt structure and checks the stored record counts through the TopSpeed driver.

Review the result

Review the field changes and recovery findings in the report. Conversion can remove fields, shorten values or change their types. If the changes require your confirmation because of possible data loss, TPS Repair asks before replacing the files.

With a licensed copy and the default replacement settings, verified files replace the originals. The originals are kept together in a backup ZIP. Check Saved outcome for the result and backup locations, then open the files with the updated application.

If the report says the file's own structure was used instead of the supplied source, that file has not been converted to your intended target. Select the EXE or DLL containing the matching declaration and try again.

Try the conversion before replacing files

The evaluation performs the conversion and saves limited evaluation samples without replacing originals. See the evaluation limits.

Open the samples with the new application to review the converted data. With a licensed copy, use --no-replace to keep the converted files in a separate ZIP for review.

Download TPS RepairFollow the manual

Why Error 47 appears

The TopSpeed driver compares the structure stored in the TPS file with the declaration in the application. An incompatible declaration prevents it from opening the file.

Common causes

  • The new version changes fields, types, lengths, memos, keys or indexes.
  • The application and data come from different versions or installations.

If the previous application opens the file, a structure mismatch is likely. That alone does not prove that every record is intact. See recovering a damaged TPS file if the file also shows signs of damage.

Other situations

  • The old structure is unreadable: a new declaration cannot substitute for the missing old structure. See how to supply the original structure.
  • You need to resume work with the previous version: use the previous application with matching data or a suitable backup. This rolls back the upgrade; it does not convert files for the new version.
  • The conversion needs business rules: custom conversion code may be needed to calculate or transform values beyond ordinary field conversion.

The manual covers field matching and conversion rules, including other supported structure sources.

If the conversion stops, send the TPS Repair version, Windows version, exact error message and TR support code to tpsrep@sca.mx. Do not send TPS files, reports or attachments.