RE: Help Recovering Deleted Btrieve Records

No. BUTIL will not recover deleted records. As I stated in that thread, I know of no methods of recovering deleted records. The way Btrieve / PSQL works is that once a record is deleted, the record entry on the PAT (Page Allocation Table) page is marked as "free space." The next record to be inserted could use that space (or not). Recovering any records would be a long and difficult process. You would have to know exactly where in the file the record is, where in the PAT page the record is marked as free, and possibly some other non-documented information. In my 17 years of using Btrieve, I've never seen a tool that can recover deleted records.

RE: Help Recovering Deleted Btrieve Records

Thanks Mirtheil - unfortunately there is no backup as it happened during the day and is only a subset of the records. I am happy to have my team code something or pay for something to be coded by someone else. We do have a copy of the file before new data was input.

RE: Help Recovering Deleted Btrieve Records

I don't think coding a solution is an option. Some of the information needed has never been published by Pervasive. Specifically, some of the page structures and other information needed to "unmark" a deleted record.There was a tool called Datasave from Jim Kyle but it was designed for corrupted files and I believe it only works with v6 format Btrieve files.

If you really have no backup, you'll need to recreate the deleted records.

RE: Help Recovering Deleted Btrieve Records

It's even worse than Mirtheil said: when Btrieve deletes a record, it completely zeroes out all the bytes of the record so that even if you knew the exact disk address, you would find no data there. It's been this way since Version 1.0 way back when, and was done deliberately as a security measure.

The only solution is to have good backups, and make a special backup copy before doing anything the slightest bit risky.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action.