Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I detect a corrupt table?
Message
 
 
À
19/10/2001 08:03:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570721
Message ID:
00570747
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
Hi Will,

Unfortunatelly there're no relaible ways to detect index corruption. In many cases corupted indexes doesn't generate foxpro erors but cause some command/function (Select, Seek and so on) to produced incorrect results.

In many years working with foxpro I've seen error like yours maybe once or twice of many dozens of index corruptions.


>Afternoon all (Morning for some of you)
>
>I have a table which has a corrupt index expression
>Ie there is an index in the table which points to a field which does not exist
>
>Each time I open the table it gives an error "Variable 'OD_CD' is not found." (In fact it should be prod_cd)
>
>It's easy enough to fix this issue.. I could just do a delete tag all & recreate (or similar)
>
>But I was wondering how do I detect this kind of issue programatically?
>If I do something like the following:
>
>llFlag = .f.
>On error llFlag = .t.
>Use table in 0
>
>If llFlag
>  Wait Window 'Error occurred'
>EndIf
>
>the flag is not set correctly & a VFP error still comes up, which I don't want my users to see.
>
>Does anyone know of a way to either trap for this kind of error or detect the issue in the dbf? (I can see a million suggestions for SDT coming in my direction)
>
>TIA
>
>Will
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform