I can't seem to find anything on the web about how to connect to a LibreOffice database. I am currently using the following code to connect to a MS Access database and would like to know how to change it to work with LibreOffice.

String strConnect =
   "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=C:\\db\\myDatabase.mdb;";

Connection con = DriverManager.getConnection(strConnect, "","");
if (null == con)
   System.out.println("Unable to connect to data source " + strConnect);

System.out.println("Successfully connected to database. Data source name:\n"
   + con.getMetaData().getURL() + "\n");


LibraOffice hasn't got any database, but does provide front-end suite, Base, that let you connect to different databases. You better check the features here

Thanks for the reply, Peter.

Here's the problem: I used LibreOffice Base to create a small, 3 table database for my business. The resulting file is in OpenDocument database format (.odb). I want to use Java to connect to and perform operations on that database.

Any suggestions? Anyone?


I should have been more specific. I'm pretty new to databases and LibreOffice, so I didn't know how to ask the question correctly.


This question has already been answered. Start a new discussion instead.