Gallery with screenshots
Download last version
Check and repair utility for Visual FoxPro, FoxPro and other DBF-type tables. You can see and repair nearly all items in the header, structure and data of the table and memo files. It can be called from code to automatically repair bad headers or data.
It is well known, that if a FoxPro program (any version) appends/writes to a table and computer crashes, the table becomes bad. Next time when FoxPro uses it, an error appears, like this:
Not a database file (Error number 15)
Table "name" has become corrupted. The table will need to be repaired before using again. (Error number 2091)
MEMO file is missing/invalid (Error number 41)
For several years of working with large data massifs and many clients, we discovered that in 99 % it is possible to recover tables and memo files with small or no loss of information.
One of the problems occurs when FoxPro appends records. FoxPro engine writes buffers on disk in this order: first changes record number in the header of the table, and after changes the size of the file and writes data. Better way is to reverse order of this two operations, but it is embedded in the Foxpro engine.
During the years we added many more functionality to CM Table Repair, such as auto-repairing of errors when obtained, checking all tables in given folder, repairing tables over 2 Gb, backup and auto-backups, repairing memo file headers, examination of data in table checked at low level (that means independent from possibility of VFP to open the table), powerful Read/Write test with possibility to repair hidden errors in data, such as error 39 (numeric overflow) and 41 (invalid memo file addressing) and many more.
From version 2006b are added new action possibilities after ordinary and/or read/write table check: pack, reindex, zap, copy and export in different formats.
Application consists from one run-time file: cmrepair.app. This is a Visual FoxPro application, so you need VFP installed on your system. It was tested with VFP 7, 8 and 9. It should work with VFP 6, but we are not testing our applications with this version of VFP any more.
To use this software you need to purchase license
, please see license conditions
HISTORY SINCE THE UTILITY IS PUBLISHED
To CM Utility Downloads Section
Gallery with screenshots
- First Foxpro 2.6 versions.
- First Visual Foxpro version (VFP 6).
- Some interface changes and users suggestions.
- bugs removed (no more errors in case of any file checking)
- some long file name problems decided
- Upgrading and support for VFP 7
- Added support for auto-incrementing in tables
- Upgrading and support for VFP 8
- Changes and improvements
- Added support for new data types
- Upgrading and support for VFP 9
- Removed limitation for number of records in advanced memo file analysis in case of running with VFP 9
- Auto-repair mode now repairs both record numbers and file size
- Activity in auto-repair mode logs to a file with same folder and name as the utility, with .log extension
- Introduced is new (third) calling parameter: number of risk records in auto-repair mode (defaults to 5)
- Auto-repair mode now repairs memo file headers in case of error 41 "memo file invalid" (next free block number and block size)
- More precise handling of memo file checking process and offer to change memo file attributes
- Checking given folder for corrupted tables, both manual and auto-repair mode
- Introduced is new (fourth) calling parameter: path and name of log file for auto-repair activity
- Introduced is new (fifth) calling parameter: silence mode (if .t.)
- Introduced are new output parameters: info for performed work in auto-repair mode
- Save and restore last directory where checking is performed (if not file or folder given as parameter)
- Different style of starting: first screen appears, afterwards opening the table to check
- Bugs are removed (refreshing in window "Memo file analyzing", appearing of the interface in auto-repair mode in case of not damaged table)
- Improved documentation
- Introduced is possibility to fix the problem if repaired table exceeds 2 Gb (the Foxpro limit) and becomes corrupted (that happens for example when error 1190 "File is too large" is not triggered in VFP7 and below).
- Removed dependence on foxtools.fll. If you are using old versions of VFP (<7), please set library to foxtools.fll in advance.
- Support for all known Foxpro table types: DBF, FRX, LBX, DBC, SCX, VCX, MNX, PJX and respective memo files.
- Auto-backup parameter and separate button (parameter is 11-th and defaults to .f.!)
- All reported bugs to the moment are removed
- More interface improvements
- Stand alone EXE version (for registered users only)
- Handling of error 13 (Alias is not found) when opening table in folder checking procedure. This error occurs if a table alias is used in index expression in CDX file, but not exist at that moment.
- In case of folder checking all files with known table extensions are included in the process. The user can edit extensions list.
- Procedure to read and show data from the table file is introduced. Reading is performed at low level, so it is independent from VFP possibility to open the table. For now we have 2 modes: "normal" - shows data with their data types, like in BROWSE window, and "raw" - you can see data from the file without any conversion, for example in Integer fields you see bytes, not digits, and in Memo type fields - bytes from memo block addresses. In both cases data are shown in columns, as specified in the table structure.
- Read/Write test is introduced. This helps to find hidden errors in table data, such as numeric overflow and bad memo block addressing. This mode also have auto-repair possibility and one more parameter is added: tlAutoCheckdata. Columns of output array a_TableCheckInfo are also increased to hold results from new RW test.
- Example functions are extended for checking given folder in auto-repair mode with displaying the result, ad for RW test.
- Improved help.
- Handling read-only files - when program attempts to open in read/write mode to change them, first attempts to reset read-only attribute to make file writable.
- Added total size info for table checked (table + memo and index files).
- Reporting - preview and/or print results from checking table or folder with tables. Report FRX files are included in the app.
- Corrected are some errors in RW test procedure connected with field validation expressions and other small bugs. More testing and improvements.
- 5-th parameter tlSilence is changed to numeric (.t./.f. accepted anyway) and if tnSilence > 1 user can see new reports without displaying the interface See this parameter description for all valid values.
- Added possibility to perform various service actions on tables: pack/reindex, reindex only, zap, copy to folder, export as XLS, export delimited, export with tab.
- This actions also have auto-possibilities and one more parameter is added: tnAutoActTables. Columns of output array a_TableCheckInfo are also increased to hold results from new actions.
- Added one more parameter: tActParameters. For now it is used to define output folder in case tnAutoActTables is 4, 5, 6 or 7 (copy or export).
- Provided is one more example program example_1table_all.prg - haw to call cmrepair.app for one table and after ordinary table check to test Read/Write, and also to perform given action (packing or other).
- Added possibility to run cmrepair.app in modeless mode (see additions to tnSilence parameter.
- Added "Modify structure" possibility - sub-menu in "Use table" button.
- Added new export format: simple HTML - data from the table are exported with no or minimum formatting.
- More functionality in hole folder checking (all tables in it). Possibility to backup the folder. Interface changes - simplification, additions and more intuitive.
- Preserve original filename and case in displaying results and creating files and folders.
- VFP stand alone executable version is introduced - cmrepair.exe, requires VFP runtime libraries (for registered users only - on request, compiled with VFP version 9 only).
- Added button for cleaning the folder (and all sub-folders) from files with extensions TMP, BAK or TBK.
- Resolved conflict when in table name are used special characters (not allowed in alias name).
- Extended exporting capabilities:
- in case tab or comma delimited export - replacing the delimiter in all character fields with space - because VFP do not care to do this in COPY TO command and exported file can be truncated at some points (where the delimiter is contained in the data).
- before export with COPY TO command - creating an intermediate cursor with transformed memo columns of the table - to C*254 columns (this is because VFP can not export memo fields and neglects them).
- Possibility to select which columns of the table to export, and also their order (their succession in destination file).
- Added new export format: MySQL - data from the table are exported in a file with sql extension. This file contains valid SQL commands for creating the table in a MySQL database and also INSERT commands to import data. The file can be used in an MySQL database utility such as phpMyAdmin.
- In addition to above MySQL format: php variant. An file with php extension is created. If this file is uploaded on the server and HTTP accessed - table and data are imported in given database. To specify database and connection parameters, it is obligatory to specify them in the beginning of the file (please see variables $sqlhost, $sqllogin, $sqlpass, $dbname and init them).
- Auto-repair mode now changes table flag in case the table is marked to have CDX file, but CDX file is missing. This permits table to be opened with success.
- New possibility to pass as parameters table structure arrays (also indexes), in case table path is given, and new button and form with detailed comparison of given structure and real structure of checked table.
- New possibility to use Windows API functions for low level file manipulation. This permits to check, repair and auto-repair tables even they are used from other users in the network in share mode. Now using API calls in CM Repair is default, but a parameter is provided if user like to force handling of files with Visual Foxpro low level file manipulation functions (see modified nAutoRepair parameter). In interface mode a checkbox is provided to control which functions to use.
- Introduced is database check. That means checking, testing and repairing DBC container and all tables in given database.
- Auto-repair mode is extended over given database. See modification of 1-st calling parameter, and also calling example provided.
- Introduced is "Get healthy header" possibility. This procedure gets header from other table with exactly same structure and stuff it in the examined table file. To be used when data in the table file seems to be in line, but header is severe demaged.
- Pack test is introduced. This helps to find hidden errors in table data, such as bad memo block addressing (error 41). This mode also have repair possibility. The procedure is especially useful when error 41 is reported when packing only (not when open or read data in the table).
- A bug fix release:
- Extensivelly tested with Visual Foxpro 6, 7, 8, 9 - proper usage of respective commands.
- Siutable implementation in Windows 7 environment.
- Tested and adjusted to run in Windows 10
- Intenzive testing and bug fixing in memo file analizis window.