Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fixing table with CMRepair
Message
 
To
16/11/2023 06:33:27
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01687246
Message ID:
01687265
Views:
31
>>>>I have a table from a client that's giving error 41. When I scan through and try to read the memo fields, it throws some errors.
>>>>
>>>>I bought and downloaded CMRepair. When I run the memo test it offers on this table, it turns up a problem that I suspect is the main issue. But I don't see how I get the tool to fix the problem, and the Help isn't helping.
>>>>
>>>>Anybody been through this and can guide me.
>>>>
>>>>Tamar
>>>>
>>>>P.S. Yes, I've been very lucky over the years and never needed to fix memo corruption before.
>>>
>>>Do not know this tool, I would try it low level - the format is not that tricky. But guide you through might be a problem to me. If the data is not too private I offer to try it over here.
>>
>>Thanks for the suggestion. I had a months-old copy of the table and ended up writing code that scanned through, and tried to access the memo fields of each record inside TRY-CATCH. If it failed, I blanked the field and then pulled in the data from the old copy. That resolved the errors. I still need to see if I can grab the content for the memos of the newer records (from, say, a hex editor) and push it back in, but pleased that I was able to resolve the errors.
>>
>>Tamar
>
>I still think one should mimic the way the memo is referenced from the dbf low level. It's just a boring read of the data from the DBF and looking up what is stored in the memo file. Should be possible since the data structure of dbf and fpt is well known. The 2 tricky things: Watch double and missed blocks. I would dislike to do this via pen&paper.
>- COPY FILE both files, dbf and fpt
>- on the duplicate, set all the memos to empty low level (alter the dbf low level)
>- minimize the fpt
>- then parse the original for memo chunks as suggested above, those chunks you can simply add to the duplicate with REPLACE or the like.
>- note the double/failed records somewhere
>- with bells and whistles: figure out the untouched memo blocks in the memo file, list them for the operator, possibly he can identify missing data.
>
>Create a generic prg and post in VFPX.
>;)

But I thought there was no backlinks in the FPT to point back to the DBF record who owns it? In cases where the FPT pointers in the DBF are corrupted (or the pointers are fine but the content of the FTP has been corrupted) how can you parse the FPT and "know" what DBF row that chunk belongs to? Apologies if my understanding of the internal structure of DBFs v. FPTs is incorrect.
________________
_____/ Regards,
____/ al

___________________________________________
www.jcn-associates.com
Visual FoxPro Database Application Development and IT Project Management
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform