Transferring data frfm MS Access in win10 to LO Base in linux

Linux Mint 21.2, Libreoffice 7.5 flatpak. Exporting from win10 MS Access to both dBase IV and dbase 3 (DBF/DBT files) for transfer into Base. Libreoffice 7.5 is on the win10 OS as well. I’m exporting a MDB file with 4 tables. In win10, I open an existing database in LO type dbase. It opens perfectly, whether I point it at the db3 or the db4 files. I save the new ODB. Reboot into linux, and that ODB is blank with no tables. Returning to win10, the same ODB shows the tables. This should not be. Further, attempting the same open existing database and pointing at the dBase files appears to work, but no tables show up.

Accessing the mdb with Base on all platforms: UCanAccess-A Pure Java JDBC Driver for Access

Reconnect a lost connection to a dBase folder: menu:Edit>Database>Properties…
Always take notice of the statusbar.
biblio_statusbar

I’m sorry, but that site is complete gobbledegook to me. I did find jdbcDriverOOo.oxt and the extensions manager in Base claims version 0.0.4 is installed. I have Java installed as well. But it won’t open the mdb file, as asked for some command string, which also makes no sense to me. Further, testing the connect to the dbase file says connection successful. But no tables!

Seems you have only copied the *.odb-file to your Linux system. You will also need to copy the folder, which contains the dBase-files you exported from Access.

*.odb-file only connects to the dBase- files. There are internal databases like HSQLDB or Firebird, but for all other connection the data have to be copied also.

That I did :slight_smile: I keep all my data files on separate drives accessible to both Linux and Win10. So all the dbase files are in a folder there; I can see them fine. further I can open the DBF files files in LO Calc, with all the data intact. It’s just LO BASE on the linux side (not the parallel installation on the win10 side) that won’t display them.

When you save an .odb file in MS Windows, it remembers the path to the folder where the dBase files are located. The path can be relative or absolute. You can see this path in the content.xml file of the .odb archive, for example (relative path):

<db:file-based-database xlink:href="../../" db:media-type="application/dbase"/>

When opening the same .odb file in Linux, the path to the dbase files previously saved in MS Windows may become irrelevant.
The same can happen on MS Windows if you move the above .odb file to another folder.

To access the original mdb file, all you need is Java, any Java installed by your distribution.

  1. Download and extract the UCanAccess archive.
  2. Call menu:Tools>Options>Advanced
  3. Click [Class Path…] and point to loader/ucanload.jar in the extracted folder. Confirm the configuration dialogs.
  4. Create a new database document connected to an existing database (the mdb file) of type “JDBC”.
  5. Enter ucanaccess:// followed by the path to your mdb file, for instance ucanaccess:///home/Elmar/Documents/MyDatabase.mdb
  6. Paste the following into the box “driver class”: net.ucanaccess.jdbc.UcanloadDriver

To access the dBase database, you don’t need any Java nor extension.
Create a new database document connected to an existing database of type “dBase” and point it to the directory where your dBase files are stored.
dBase is a database in a directory. Files with extension .dbf contain the tables.

P.S. The extension “jdbcDriverOOo” has nothing to do with Access databases nor dBase. You don’t even need it for native Base databases.

1 Like

Thank you for this explanation. But it does not explain why I cannot, while staying completely on the linux side, get the same result with a new ODB looking at the plainly visible DBF files. Where are the “context.xml” files for a particular ODB located? But thank you for explaining at least this oddness.

I get an error on test here. My path is /home/ets/UCanAccess-5.0.1.bin/loader/ucanload.jar My class path is
ucanaccess:///mnt/363D179A5F47C759/karate/ranking/rankings test.mdb
I put exactly net.ucanaccess.jdbc.UcanloadDriver in the JDBC driver class slot, and hit test class. I get JDBC driver could not be loaded. the bottom strip says that I am looking at the dBASE files in the appropriate folder. Attempting to reopen that ODB give me “The connection to the data source “New Database” could not be established.” The other error listed is “The driver class “net.ucanaccess.jdbc.UcanloadDriver” could not be loaded. at /run/build/libreoffice/connectivity/source/drivers/jdbc/JConnection.cxx:686”


The configuration dialog specifying the class path for ucanload.jar


The connection dialog with ucanaccess:///path_to_database_file and with the driver class to be used.

UcanAccess_Northwind
Microsoft’s Northwind database in a Base window. The contained queries are presented as views.

This is an important question - but I doubt anyone could answer it without seeing a sample of the problem, with an ODB and a DBF.

Please upload a new “problematic” .odb, let’s try to figure it out together.

“DBF” in upper case letters? Rename the file(s) to dbf.
https://bugs.documentfoundation.org/show_bug.cgi?id=46180

2 Likes

I am at a real loss here, since my screens don’t look anything like yours. OK I’m going to upload the mdb file, and the db* files exported from it to my google drive. Here is the link
https://drive.google.com/drive/folders/1gKsgIXg6HVUdVyaj6jDWjlWX8canjxb0?usp=share_link

For dBase files, use @Villeroy 's recipe.
Rename ALL DAN .DBF to ALL DAN .dbf and so on. After that you will see all .dbf files from the folder as tables in the database document.

Why not file a bug report in addition? :wink:

https://bugs.documentfoundation.org/show_bug.cgi?id=46180

You must not connect the database document to the jar file. The jar file is the software which is able to read and write Access databases.
You register that jar file under Tools>Options>Advanced>Class Path…
Then you connect your database document to the mdb file.
This is your Access database in Base:
Bildschirmfoto von 2023-04-30 20-25-03

  • I extracted your files to /tmp/database
  • Opened your database file
  • Called Edit>Database>Properties… and replaced the wrong path to ucanload.jar with ucanaccess:///tmp/database/rankings.odb

database is the database folder with your

  • rankings.mdb
  • the dBase_IV directory where I removed all spaces from file names and applied lower-case file name extensions.
  • rankings.dbf.odb is the Base document connected to the dBase_IV directory.
  • rankings.mdb.odb is the Base document connected to rankings.mdb. I would prefer this one. It requires that you add ucanload.jar to the class path setting in the LibreOffice options dialog.

Bless you and thank you, oh guru. Finally! Now I just have to recreate my forms, queries and reports :slight_smile: But the big hurdle has been passed. I just wish this were a bit more transparent and easier for a clueless 72 year old :slight_smile: The developers of Base should realize that the primary object is to allow folks to abandon M$, no? And this thing with upper case vs lower case? I guess I’m just too old - case didn’t matter in file names or file extensions. But I guess this is Unix, so it does matter.