Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Corrupt DBF tables in VFP 6.0
Message
From
20/09/2000 13:33:29
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, California, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00416824
Message ID:
00418640
Views:
51
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.
Eric Shaneson
Cutting Edge Consulting
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform