Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index file broken
Message
 
 
À
19/08/1997 20:46:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00045718
Message ID:
00045824
Vues:
35
>I am programming with Foxpro 2.6 for DOS. It happens to me very often that
>the applications go on working with broken indexes. Is there any way of
>detecting when an index file has been (damaged) broken?

The advice I give my users:

1. If you know a particular item in a tables exists but you just can not find it, the index is probably corrupt. Rebuild your indexes.

2. If you get any of my messages (from error trap routine) that say to reindex, please rebuild indexes.

I set up an error trap that includes any error code returned that could indicate a corrupt index, and return these "cleaned up" messages to my users. One that I have been getting lately, that was a gotcha, was "File not open" which turned to be a severely bloated and corrupted index that was caused when the computer went down in the middle of a process. That problem took a little time to figure out. I had to delete the CDX, Use the table, trap the error of "structural index not found", ignore that error, then issue a second Use command on the table which finally opened the table for reindexing.

I wrote code to trap all these errors in my reindexing routine. The first of which is to DELETE TAG ALL as soon as the table is successfully opened. This will prevent index bloat.

See Barbara Paltiel's "Baffling Delete Problem" thread.
HTH.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform