Open Java DB database in OpenOffice Base or Microsoft Access

436 Views Asked by At

I created a database in NetBeans, and I was wondering if it was possible to open it in OpenOffice or Access for easier ease of use. The database is stored locally. Thank you in advance!

2

There are 2 best solutions below

0
Bryan Pendleton On

You have to use JDBC to access a Derby database programmatically.

However, there are command-line tools that access a Derby database, for example Derby's own ij tool as well as others.

Many other software packages have the ability to "call out" to a command-line tool. If either OpenOffice or Microsoft Access have the ability to "call out" to a command-line tool, you should be able to have them call out to ij (or any other JDBC command-line tool of your choice) to access the data you want.

For example, you could invoke ij, have it run a simple script that called SYSCS_UTIL.SYSCS_EXPORT_DATA to export some table data to a csv file, then import that csv file into OpenOffice or Microsoft Access.

2
Gord Thompson On

In order to open the database using Microsoft Access you would need to have an ODBC driver for Derby (Java DB). Access does ODBC but it does not "do" JDBC.

However, OpenOffice/LibreOffice Base does in fact "do" JDBC so you could simply use the same JDBC driver (JAR file) that you used with NetBeans JDBC to open the database in OpenOffice/LibreOffice Base via JDBC.