Answers to Frequently Asked Questions about the TTUtility Table Repair Components
If you can't find the answer to you question here then drop us a line at firstname.lastname@example.org. We always like a good question.
Yes there is a problem with rebuilding tables correctly that have auto-increment field types using the TUTILITY.DLL. The problem effects both our TTUtility component and Borland's table repair in Paradox. This problem is fixed with the TUTIL32.DLL that shipped with Paradox 7.
The problem is that the rebuild method resets the values of auto increment field types during the rebuild. So, for example, if you have a table with three records and the record has an auto-inc field with values 1, 3, and 5 to start, after a rebuild the values in the auto-inc field will be 1, 2, and 3. Since auto-inc fields are usually used to establish unique keys for the purposes of relating files, this reordering of the key is "not a good thing".
Here are some options.
This problem is usually caused by a corrupt autoincrement seed in the header of the DB file. The DB file contains a header section followed by the Data section. The header section contains a number of pieces of information critical to keeping the data organized and meaningful. Among other things the header stores the "seed" for the autoincrement key. That it, it stores the value for the last autoincrement value plus one.
Sometimes when a table is damaged by an invalid close of the BDE (power loss, Ctrl-alt-delete) or by not properly setting the LOCAL SHARE to TRUE in the BDE Administratior - Configuration - System - INIT, the autoincrement seed is not updated when a new record is created so when the next record tries to be created a "key violation" or "duplicate value in unique key" error is generated.
Unfortunately the TUTIL32.DLL can not fix this problem.
When this happens, the recommended fix is to use Database Desktop to restructure the table (Tools | Restructure) changing the autoincrement field type to a "Long Integer" field type then save the changes then restructure the table again changing the field type back to the autoincrement field type.
NOTE: Our testing shows that if LOCAL SHARE is not correctly set that this problem will happen quite ofter.
You have probably just recently installed Paradox 8 or WP Pro. If this is the case, it turns out that there is an error in those programs installer that incorrectly puts a trailing semicolon in an inportant registery path. To fix this go to start | run and type regedit and press ok. Once the registery appears havigate to \HKEY_LOCAL_MACHINE\Software\Borland\Database Engine and double click on the "DLLPATH" in the right window. You should find a trailing semicolon in the string. Delete it. Press OK and close the registery editor. That should fix the problem.
Back to Top
Back to O&A Home Page