Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad Header File

Status
Not open for further replies.

dzdncnfsd

MIS
Jul 14, 2000
118
US
I have a table with several memo fields that is displaying the wrong data in the wrong fields for some records. I ran a FoxFix program against the table which indicated that the file has a bad header. The table is part of a VFP 5.0 database container, and the .dbf and .cdx files are over 1GB each. The .fpt file is just under a gig, so &quot;working&quot; space is a consideration. Does anyone have any suggestions about fixing it?&nbsp;&nbsp;At this point, we are still using the table.<br>Thanks. <p>Gladys Clemmer<br><a href=mailto:gladys.clemmer@fifsg.com>gladys.clemmer@fifsg.com</a><br><a href= > </a><br>
 
If some of the memo contents are bad, my usual approach is to use COPY to make a copy of the table, then COPY it back to the original (or rename).&nbsp;&nbsp;This process sometimes fixes memo field issues, because VFP must actually follow the DBF's memo pointers when writing out the copy, and it occasionally fixes the problem.<br><br>But since you are limited on disk space, and since you didn't specifically say the wacky data was necessarily in the memo field, this solution may be worthless to you.<br><br>If the corruption resulted from crossed clusters on your disk, there is no complete fix for the records themselves (IOW, the data won't magically end back up where it belongs), although you should be able to correct the header. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Hi Robert, <br>I have seen cases where a damaged database header is transfered to the new database with the copy to command.&nbsp;&nbsp;I do the same thing as you only I create a new table from scratch and then use the append from command.&nbsp;&nbsp;Guess you could also use the copy to extended command also.&nbsp;&nbsp;&nbsp;But again,&nbsp;&nbsp;If the fpt file is damaged, this will not realign the correct memo to the correct records. <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
You might be able to:<br>COPY TO FOX2X<br>Then try DSALVAGE PROFESSIONAL or a similar product to see if you can repair the damage. If it works you could then write a prg to transfer the data back into a VFP table. I've never tried this -- maybe others could comment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top