I am getting error 41: "memo file 'name' missing or invalid on one of my tables. Before I did something stupid I want to hear if there are any established ways to salvage the situation. I am getting this error when I am trying to use the file programmatically and also when I browse the table in browser.
HOWEVER, in the browser I can read all the memo fields. I can open them up and also they appear in speedtips (It may be a dBase term): I mean those fleeting windows where the content is displayed while the mouse is hovering over the Memo field.
There might be a tool in VFP which I am not aware of to restore a table integrity.
Thanks.

memo file corrupt
LCasselle
"we need to protect our applications from our customers"
And from ourselves... In my case at least:)
"when a record is saved it is also copied to an exact backup file"
I want to get into details. Do you save just one record, the one that has been changed or the entire table each time ONE record is saved with TABLEUPDATE ()
I presume you have duplicates of all your tables in a special database with tables named differently but having the same structure. You save just individual records in them, right
Could you describe your protocol a bit more in detail please.
Thanks.
GSGIMD
Good point. I experience this each weekend. Most of my customers use my software from laptops at a racetrack. They are powered by generators that fail, run out of gas, or are just plain shut off without powering down the system properly. This corrupts data all the time.
I handled this problem with a few lines of code. All of my Crew Chief Pro customers are single user systems with less than 2500 records per table, so when a record is saved it is also copied to an exact backup file. Each time the EXE file is started it checks each file for problems, if one is encountered the backup is copied over instantly and the program moves on. No more error messages and zero problems.
I ask customer to backup data every time they exit, few take the time to backup to an external drive.
It is a harsh world and we need to protect our applications from our customers.
vinayshetty
I've fought this one for 15 years. It comes under the heading of "Sh*t happens," and it's VERY common in VFP.One of our products - built in vfp v3 - v8 - has seen this problem numerous times. It usually occurs when a customer's computer gets shut down with the program running - i.e. power outage. Memo files left open when the plug is pulled or the machne locks up are subject to corruption. Here is the most useful portion of the knowledge I've built about this to date:
1. Most of the time, the file can be salvaged by opening it in the programming language instead of the application you built. The language tells you about the problem when you open the file, offers to fix it, and it works. Pack the file after you have done this to build a new file, otherwise it will corrupt again for no apparent reason.
2. The problem is so wide-spread that Third-party components are available for your application to recover by itself from this problem. They are expensive, though - and the last one I looked at charged a license for each distribution - so I never bought. I've talked to a MS tech about the languages' ability to recover files, and was there something you can package with your apps to accomplish this - as of v6, there was not. He recommended the 3rd party apps.
3. In our latest version of the program, a data integrity check is instituted every time the software is shut down. The routine packs and reindexes every table, then - if it has not already been done once today - backs up a copy of the table to a subfolder. In the event of an error packing or reindexing - which happens with a corrupted memo file - the software tells the user, and offers to replace the file using the one from the last backup to the subfolder. In effect, one day's data could be lost.
SMR
nyo2x
I will try. In spite of what I've said, I found out that I could not read just one record, the last one. I saved the table and deteled the last record as a half measure. Will try COPY TO.
Thanks.
aimless
also
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=381889&SiteID=1
dave
sgcook
Can you copy the data out using "Copy to" That usually works for me with minor corruptions..
DaveLinto Poulose E
Tamar
Dlloyd
Yep, this is a long-standing problem for me too. I've had it with dBase for years. My computers do not shut down--weird I lose data while transferring code to memory sticks. I then take it to another computer, continue some development and next day bring back. If a corruption happened on the way--it is sealed. This time again, after many months of smooth sailing, I got caught in complacency. I was tired and pulled it out of a USB slot without proper disconnect. I thought I would get away with it--not the case, though.
A memo file actually can be viewed in a notepad--very easily. I examined it and found out that the last record's memo that I could not read was gone. Instead the next to the last memo was repeated perhaps a hundred times. This is what I've seen in dbase .dbt files as well.
Thanks.