[Solved] Can't open .odb file: ASCII filter error

Discuss the database features
Post Reply
brianoa515
Posts: 5
Joined: Sat Apr 18, 2020 4:36 pm

[Solved] Can't open .odb file: ASCII filter error

Post by brianoa515 »

Hi everyone!
I've created a database I've been using for quite some time.
Now, when I try opening it, it's asking me to set my ASCII filter preferences or something like that (I'm not very technical).
Whichever option I choose, the file then opens as a text document containing gibberish.
I wanted to attach the file, but it appears to be too large, so I wasn't able to.

Thanks for your help. Much appreciated! :D
Last edited by brianoa515 on Mon Apr 20, 2020 6:31 pm, edited 1 time in total.
OpenOffice 4.1.7 on MacOS 10.7
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't open .odb file: ASCII filter error

Post by John_Ha »

That almost certainly means the file is corrupted beyond repair.

Post the file to a file upload site (Dropbox, Google drive, media fire etc) so it can be analysed.

Try using a file recovery utility like Recuva or the Windows Previous versions (see [Tutorial] How to find and un-delete AOO temporary files). I do not believe the database files can be recovered like .odt files as temporary files may not be written though I could be wrong.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
brianoa515
Posts: 5
Joined: Sat Apr 18, 2020 4:36 pm

Re: Can't open .odb file: ASCII filter error

Post by brianoa515 »

Thanks John.

Here is the file, hope you can open it: https://drive.google.com/file/d/1VlQXH3 ... sp=sharing

Hope it isn't corrupted beyond repair!!!!!
OpenOffice 4.1.7 on MacOS 10.7
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't open .odb file: ASCII filter error

Post by John_Ha »

Your .odb file is corrupted and you need someone who understands the internals of database .odb files better than me to see if they can recover anything from it.

It opens OK as a ZIP file but when I attempt to extract some of the files it says they are corrupted. I allowed 7-ZIP to repair the file but that still did not fix it.

It kept opening in Writer which confused me.

LibreOffice also had problems.
Unzipping the .odt file
Unzipping the .odt file
\database.  backup is corrupted but data seems OK
\database. backup is corrupted but data seems OK
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
brianoa515
Posts: 5
Joined: Sat Apr 18, 2020 4:36 pm

Re: Can't open .odb file: ASCII filter error

Post by brianoa515 »

I see. So I'm basically in trouble...
OpenOffice 4.1.7 on MacOS 10.7
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't open .odb file: ASCII filter error

Post by John_Ha »

Yes. See my previous post and look for old deleted copies of the file.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
brianoa515
Posts: 5
Joined: Sat Apr 18, 2020 4:36 pm

Re: Can't open .odb file: ASCII filter error

Post by brianoa515 »

Ok, thanks John. Really helpful!
OpenOffice 4.1.7 on MacOS 10.7
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't open .odb file: ASCII filter error

Post by John_Ha »

See [Solved] - odb file opens with "Choose Filter" after crash where Sliderule says
Sliderule wrote:I would be willing to look at it . . . and . . . attempt to repair it. I am assuming, since you did not say, that you are using an Embedded database and if so . . . assuming at a minimum the internal script file is present ( not corrupted ) . . . and . . . the data and / or backup file is present . . . it can be recovered.
Both database\data and database\script files seem to be OK - at least, I can extract them. I suggest a Private Message to Sliderule asking for his assistance may be your best bet.
Clipboard01.gif
Also see Database repair for *.odb files in the LO Database Guide which says as below. Rename BERNI MOTORI CARS DB1.odb to BERNI MOTORI CARS DB1.ZIP and double-click it - you can now drag files into and out of it. Rename it back to .odb when the repair is complete.
Regular backing up of data should be standard practice when using a PC. Backup copies are the simplest way to return to an even halfway current state for your data. However, in practice this is often lacking.

In the case of sudden PC crashes, it can happen that open databases (internal HSQLDB databases) can no longer be opened in LibreOffice. Instead, when you attempt to open the database, you are asked for a filter corresponding to the format. [Your problem]

The problem here is that part of the data in an open database is contained in working memory and is only temporarily copied to intermediate storage. Only when the file is closed is the whole database written back into the file and repacked.

To get access again to your data, you may find the following procedure helpful:

1. Create a copy of your database for the steps that follow.

2. Try to open the copy with an archiving program. In the case of *.odb files, we are dealing with a compressed format, a Zip archive. If the file cannot be opened directly, try renaming it from *.odb to *.zip. If that does not open it, your database is past saving.

3. The following folders will always be seen after opening a database file in an archiving program:
Clipboard02.gif
4. The database file must be decompressed. The most important information, as far as the data is concerned, are in the subfolder database in the files data and script.

5. It may be necessary to look at the script file and test it for contradictions. This step can, however, be left for the testing stage. The script file contains above all the description of the table structure.

6. Create a new empty database file and open this file with the archiving program.

7. Replace the files data and script in the new database file with the files unpacked in step 4.

8. Close the archiving program. If it was necessary to rename the file to *.zip before opening it in the archiving program (this depends on your operating system), now rename it again to *.odb.

9. Open the database file in LibreOffice. You should be able to access your tables again.

10. How far your queries, forms, and reports can be recovered in a similar way must be the subject of further testing.

See also: http://forum.openoffice.org/en/forum/vi ... 83&t=17125

If, as described in the following pages, you are using external HSQLDB, there may be a further problem with the *.odb file connected with some LibreOffice versions. If external HSQLDB is used, the safest way is through the hsqldb.jar-archive, which is supplied with LibreOffice. If a different archive is used, it can lead to the internal database suddenly becoming inaccessible. This is because LibreOffice 3.x has difficulty distinguishing between internal and external HSQLDB and produces warnings of an incompatibility between versions.

If internal databases can no longer be opened, you must use as your external database the supplied hsqldb.jar file. In addition, you must extract from the *.odb file the database folder. The properties file in this case has an entry that leads to the above error in LibreOffice:

version=1.8.1 on line 11

This line should be changed to:

version=1.8.0

Afterwards the database folder is put back into the *.odb package and the database can once more be opened in LibreOffice.
As an aside I cannot see if or where AOO Base writes any temporary files when a .odb database file is opened. They are certainly not written to C:\Users\xxxxxx\AppData\Local\Temp which is where Writer, Calc etc write their temporary files. If you knew where they were written you could search for them and for deleted versions of them.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Can't open .odb file: ASCII filter error

Post by John_Ha »

I followed the repair procedure from 1 to 10 inclusive in the manual and I have got back your data. Send me a PM with your email ID and I will email it to you - the file is 8MB.

The forms and reports were missing but I copied every valid file from your .odb file into the new database .odb file and it now includes the reports as well as the data.

The damage seems to be in the forms as, while their names have come across, their content has not. The files do not appear to have been written to your .odb file.
Two things.

1. Keep a backup in future
2. Don't be too hasty shutting down the PC - wait 10 seconds after closing the database for the files to be written.

See also [Tutorial] Recovering a damaged odb file
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Sliderule
Volunteer
Posts: 1279
Joined: Thu Nov 29, 2007 9:46 am

Re: Can't open .odb file: ASCII filter error

Post by Sliderule »

I have been able to repair and open the Base file.

The database I could open, for example, contained a Table by the name of: MONOMILLE with 45 records.

If user brianoa515 will send me a PM ( Private Message ) with the users email address, I will send, by email attachment, the database file as an attachment.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
brianoa515
Posts: 5
Joined: Sat Apr 18, 2020 4:36 pm

Re: Can't open .odb file: ASCII filter error

Post by brianoa515 »

Great, thanks again for all your help
OpenOffice 4.1.7 on MacOS 10.7
blackcherrytree
Posts: 2
Joined: Thu Aug 19, 2021 4:53 pm

Re: [Solved] Can't open .odb file: ASCII filter error

Post by blackcherrytree »

Sliderule:

If you're still out there. I wonder if I can ask you to inspect my odb database, same thing happened. It is corrupted and I am unable to open it.

Thanks
Open Office Version 3, on a Windows 7 system
User avatar
Sliderule
Volunteer
Posts: 1279
Joined: Thu Nov 29, 2007 9:46 am

Re: [Solved] Can't open .odb file: ASCII filter error

Post by Sliderule »

blackcherrytree:

I just sent you a PM ( Private Message ).

Sliderule
Post Reply