Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fixing corruption error 2091 and mskb 814131
Message
De
10/12/2005 09:11:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01076862
Message ID:
01076867
Vues:
14
>After I read the mskb #814131 I am concerned about the repair method recommended there. In summary, when the header record count is not matching the physical number of records in the table, the method described in the mskb removes records from the table.
>This, from what I see, could have a disastrous result. What if a header of a table with 100,000 records gets corrupted and the record count in the header changes to 5. Then the method describe in the msft article will remove almost all records from the table.
>
>Why don't they come up with a method to update the record count in the header of the table?
>
>Am I missing something or the recommendations in this article are very misleading?

Non-MS solutions try to update header reccount as you suggest:) However they too can't do anything if 100000 records table current size indicates table might have 5 at most. Check fox.wikis. I remember I posted code there. Pseudocode is like this:

readReccountInHeader
readRecSizeInHeader
readHeaderSize

if FileSize <> HeaderSize + (ReccountInHeader * RecSizeInHeader)
{
calculateReccountFromFileSize
WriteToHeader
}

PS: In old times fchsize() was also usefull and you might have a chance to recover more (up to allocated cluster boundary).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform