Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing PARADOX 'Index Out of Date' errors

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
We've got a PARADOX system written in Delphi 5 with tables sitting on a central server.
Of late we've encountered a number of 'index out of date' error messages.
We're tearing our hair out as to how we can further prevent being knocked out by these - can anyone help at all ?
We make use of the idea of opening the TTable / TQuery components as we create / open the forms and similarly closing the TTable / TQuery components as we close the relevant forms.
What further actions can we consider taking to save ourself from these problems ?
Thanks in advance
Steve
 
I don't know if this will help much, but I had a similar problem last year (Paradox with D5 front-end on a small network). I tracked the problem down to one of the workstations being shutdown improperly (as in turned off while my program was still running). Education was the solution there. To fix the corrupted indices, I used a little program called "Paradox Table Repair Utility."
 
We did initially get a spate of that with users but following the heavy smacking of hands we're now pretty certain that this isn't the case.
Is there any other issues that we might consider as being the cause / ways of preventing it happening again ?
Thanks again.
Steve
 
You could consider to switch databases, because MySQL is not that expensive ;-) and SQL is the db-language of the future. I only mention MySQL because it was the first that came to mind, not because I like it so much or so... Any SQL like db would do.
The corrupted indexes can eventually only be avoided by leaving the BDE path and walking some other way (Even Access would prove to be more robust...) I switched all my apps to MSAccess tables, as the Delphi components to handle them are mostly available in native versions, but could easily be replaces by ODBC variants and then any SQL (again the s-word, sorry)

HTH,
TonHu
 
I run a large database in Paradox format and about 30 Users access it, It is good practice to close the tables on exit from the program, this will help.

I also have a user name Admin, which when anyone logs in witht his it recreats the index files, please note the this does need exclusive access to the databse to be able to reindex.

You could write a utility for this and put it on a schedule to run every night if you are getting it that often. Kind Regards, Paul Benn

**** Never Giveup, keep trying, the answer is out there!!! ****
 
I think we've previously attempted to use a 'Restructuring' system but I felt certain that we had an issue whereby it couldn't correct the 'Index out of date' errors.
Can anyone enlighten me with some fool-proof code that I might look at implementing.
Any further help would be appreciated.
Steve
 
Sorry, but I keep comming back to my previous remark: Switch away from the Paradox DB. I know it doesn't sound userfriendly (developer friendly really) but please investigate this track.
I did it once (D5 + ADO) and never even thought about returning 'home to Paradox... The dirty tricks you would have to do to keep a system up and running...>:-< It reminds me of the not so glorious days when, on a big Clipper app,. we had to rebuild all (big) indexes overnight, every night, just to keep the system working properly. After a switch to a more stable clipper databasedriver (Foxpro compatible) all was well. Last I heard (dev. was stopped years ago) was, that the largest single dbf grew to about 200 MB, indexes and memo files can be bigger... There where about 6 database files roughly that size, and a lot more (~25) smaller ones (few-100 kB each).
But that's just a war-story to justify my advice for the need to research in the right direction. Borland doesn't include a 'free' database in the package just because it's so great... And guess why they moved-on to DbExpress from D6+ ??? s-)

HTH
TonHu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top