>I have a problem on the database for Foxpro 2.6 DOS. A message of "Not a databasefile" appears when to database is corrupted due to power shutdown or any uncertain resasons.
A UPS is a good answer, but there is another one.
I've got dozens of different applications out there, on many hundreds of PCs, and it's only happened once to me, when someone tried it out on a misconfigured Windows system years ago. He restored from a recent backup.
The problem occurs when an appended record causes a FAT table update, which is not flushed to the directory before the crash. The solution: close files with appended records immediately. There are many methods. Use TIMEOUT parameter to guard from user walking away. Then test RECCOUNT before and after updates, USe and reopen if its higher. Most of my code APPENDS the record with a few fields, then immediately USE and reopen.
Yes, it could still happen, but with a teeny window of opportunity, it doesn't. Your problem happens because you leave too long an opportunity for disaster.
FoxPro 2.6 for DOS is still the best (fastest, quickest, most analyzable).
-Gary Nemeth
Gary Nemeth, 440-333-3432