Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupt DBF tables in VFP 6.0
Message
 
 
À
20/09/2000 13:33:29
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00416824
Message ID:
00418641
Vues:
44
Hackers' guide for VFP said that tableupdate() do not update header of table for speed reasons. When you want to update table header as well, you need to use FLUSH command after ending transaction. I have the same problem and FLUSH was recommended as solution. Will try it, hope it helps.


>Right, I know this. I was hoping for something preventative...:)
>
>>>This is a real problem. I posted this issue a long time ago, see thread #236192. Never did get a solution, I ended up having to write a stored database procedure to trap when the error occurred.
>>>
>>>If you find anything new out, please let me know.
>>
>>
>>Eric,
>> As I said in the prior posing, the problem happens when the header thinks there is one less record than there really is in the file. If you can write code using fopen(), fclose(), etc. (the low level file funcions in VFP) then it is easy to fix by adjusting the file length to what it should be. You need to be able to read the header and convert hex to dec and back again. If you are not comfortable with all that then the best way to fix it is to copy the file to a temp, zap the file and append back in from the temp file. Any way you do it, it has to be done with the file open exclusive. I always include a reindex prg in all my systems and I put it in there.
>>
>>Hope this helps.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform