I have a database that doesn’t have very much data in it, but for some reason, it now won’t open. When I try to open it, it says that it is corrupted and needs to be repaired. It then opens a blank ‘Writer’ document instead of Base. I’m trying to avoid reverting to a backup, but I can do that if necessary.
I have been able to succesfully recover my ODB file based on an old backup file.
- Backup both ODB files (damaged and backup)
- Open both ODB files with any zip manager program (I used 7zip)
- In the backup file delete in the “database” directory the files “data” and “script”
- Copy to the backup file the same files (“data” and “script”) from the damaged ODB (with 7zip you just have to drag and drop files from one window to the other)
- Open the backup ODB and it will contain all the data from your damaged ODB
It’ll probably by easier and quicker to use your backup. The default ‘embedded’ mode that Base uses to connect to the underlying HSQLDB database is inherently risky and corruption prone, so I would suggest using the much more stable ‘split’ mode to connect to your database - see HERE for information on how to do that. (PS: I have been using ‘split’ Base databases for years and have not lost any data so far - even when crashes occur as they do occasionally).