databasems-accessms-officelibreofficeradix

LibreOffice Base: Connection to data source could not be established


I am trying to open an MS Access database in Base using the instructions here . (I've tried both .mdb and .accdb)

I can follow the process described by Gord with no problems until the last step, where it asks me to save the database in LibreOffice format. I choose a filename (say mylinuxdb.odb), click OK, and then Base opens with this error:

The connection to the data source "mylinuxdb" could not be established.
        org/apache/commons/logging/LogFactory

Note that it is complaining about the new .odb database, not the MS Access database. Nonetheless, no data is imported.

Can anyone help with this?

Thank you.


Solution

  • Revised answer:

    It appears that this issue is specific to distributions like Linux Mint that install LibreOffice Base by default. Presumably in order to enable embedded HSQLDB databases they also install a rather old version of HSQLDB which conflicts with UCanAccess. To fix that, remove LibreOffice's copy of HSQLDB. For Linux Mint that would be

    sudo apt remove libhsqldb1.8.0-java
    

    (original answer)

    I was able to reproduce your issue with LibreOffice 6.4.6.2 on Xubuntu 20.04. It looks like the setup instructions on Ask Ubuntu may need to be tweaked.

    In the meantime try opening your .odb file, clicking through any errors. When Base opens, choose

    Edit > Database > Properties …

    and notice that the "Database URL" text box has "jdbc:" in front of it.

    URL.png

    so if the textbox contains

    jdbc:ucanaccess:///home/gord/Documents/Database1.accdb
    

    then apparently Base will try to use

    jdbc:jdbc:ucanaccess:///home/gord/Documents/Database1.accdb
    

    and that won't work. We need to have just

    ucanaccess:///home/gord/Documents/Database1.accdb
    

    in the text box (as in the screenshot above).