First, for those who may be interested. Some info from Corel.com on Index out of date error:
You do have a couple options here. Would you like to:
lighten your wallet?
or
give up a few brain Cells ?
The simpliest way is to get a copy of ChimmeySweep (
or
O & A's component for Delphi (
Now if you are into some pains and sufferings. Here is what you need to automate this process.
You will need Tutil32.dll. You should have it in the Paradox program directory. This is the 32-bit version. For Pdox 7 (16-bit) and earlier version, use Tutil.dll.
For Pdox for DOS, use TUtility.exe with command line options. What I am about to descibe here does not apply to Pdox for DOS.
You need to know how make calls to Tutil32.dll functions.
You will need a “scheduler” if you want to check the tables unattended.
If you don’t have a scheduler, you need to write one. It’s not too hard, I wrote mine.
Here is how my program works.
I have a scheduler created in Paradox that I used to run jobs unattended.
In this scheduler, I have a job that runs at 1 am every Saturday to verify Paradox tables.
(You can run as often as you need. I have large… make that huge, tables that would take a long time to run. That’s why I only run it once a week.)
The program scans a directory to get a list of the table names and save them to a temp table.
The program scans through the temp table, get the table name and verify the table (function calls to Tutil32.dll).
The result of each table is saved to a log table.
On Monday, I scan the log table for any errors. If error does occur, I could send an e-mail to myself or even page me.
Although Tutil32.dll has the ability to repair a corrupted table, I have elected to perform this task manually.
Still want to do it the hard way?
There is not a whole lot of info on this subject for using with Paradox. However, if you are a Delphi programmer, there are many more options or components you can use to achieve the same result. I find tutil32d.zip works for me. I can’t remember where I’ve found it, you can do a search on the web.
These sites have some info on the subject,
If you can understand REBLD32 from
web site. You are in good shape to create your own program. By the way, this site is in Swedish.
To Pack you table.
Again, I use my scheduler to accomplish this task.
I scan a directory for a list of all the table names and save them to a temp table.
I go down the list, get the table name, extract its original file size (use for comparision).
The codes:
….
If Not Tbl.Attach(mytable) Then
Error handler
EndIf
Try
Tbl.Compact() ;Here is the magic!
OnFail
Error handler
EndTry
…
I will get the new file size, along with its orignal file size, save the info to a log table.
That’s it. I created these programs about 3 years ago and they have been working smoothly ever since.