I had a feeling I picked up most of that code from somewhere else.
While it may have been primarily used to look for problems, I owe you a big THANK YOU because it saved my bacon a couple of times back in the day!
Also, I'm glad you were available to take credit and I apologize for not having that in the comments so I could give it on the front end.
Paul
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Friday, November 03, 2017 8:25 AM To: profoxtech@leafe.com Subject: RE: Fixing a hosed FPT file
On 2017-11-02 17:39, Paul H. Tarver wrote:
Years ago, I built and maintained a VFP6 application for a client which had a large number of tables and records and there were a lot of memo fields used. Occasionally, something would get messed up with the memo fields (not necessarily hosed, but just issues with certain records) and I remember writing a simple script to scan through the records one by one and try to recover as many of the memo fields as possible. This is a decidedly low tech way of doing things and if a memo file is total corrupted this method will not save that file but it often would salvage 99.9% of the data if the corruption was minor.
The script doesn't change anything in the original dbf. It manually recreates the original as a file named "memofix" and the script depends upon adding the memofix table to your DBC in order to protect long file names, indexes, etc. Nothing jumped out at me as version 6 specific, but do your testing with backup copies of files if possible.
DISCLAIMER: I have not used this quick and dirty script since 2010: Use it at your own risk. Author makes no warranty this is useful in any way nor can I promise it will salvage anything for you. As usual, your mileage may vary.
I created MemoCheck and put it in the ProFox downloads section back in 2009, but that was just to identify problem records: http://leafe.com/download/memocheck.zip
From the link: MemoCheck I wrote this quick app to check the DBFs in a selected folder for memo field problems. Our scenario was with free tables (not dbc-linked). This program is simply to identify tables where a problem exists--not to fix them. Zip contains project and all related files, including memocheck.exe. All suggestions/improvements are welcome for the betterment of the community! Author: Michael J. Babcock, MCP Other Open Source License 12K Last updated: 2009.01.27
[excessive quoting removed by server]