>I have a corrupted table error 2091. Which means I need to get my header back in sync with my table. There is a topic about this on the Wiki, but I am just raw enough not to be sure if I should be looking at the dbf or dbc in the HexEdit app. My guess is the dbc, but then I am not sure what row to look at.
>
>Anyone done this before and want to give me a clue?
More than likely you'll be modifying the .dbf. And the post on the Wiki is wrong, it's bytes 5-8 that you're modifying, not 4-7. 4-7 refers to the byte
offset, not the actual bytes themselves. VFP 7.0 also does not do any "auto repair" that I am aware of, as implied in the wiki post.
Additionally, we do additional file size checking in VFP 8.0 that we didn't do before, hence the reason the file can be opened in 7.0 but not in 8.0. The table is still more than likely corrupt (though maybe not, since there was a since-fixed bug that reported corrupt tables when they weren't), 7.0 just didn't complain about it. The formula is as follows:
FileSize - SizeOfHeader = SizeOfRecord * NumberOfRecords
If that's not the case, VFP throws an error. Fixing this can be a little more tricky than the "off by one" header corruption, since you don't necessarily know how the file size got corrupted, nor what to trim or add to fix it.
Mike Stewart