Turing's Man Blog

Part 13. LibreOffice Base to Oracle Database 11gR2 through JDBC

Bookmark and Share

This is the last part of our tutorial. Now we will connect from LibreOffice Base to Oracle Database 11gR2 through JDBC. Of course, as far as MS Access supports ODBC connections it will never support JDBC. However, we're in the open source world now – is LibreOffice Base a "free" replacement to MS Access? I don't know. Maybe to some extent – however, being skilled with MS Access I can't find many useful features of MS Access in LibreOffice Base, including the fact that I have serious doubts about stability and overall performance (although, it is getting better and better). Anyway, we will now take care about integration of LibreOffice Base (at least 3.6.4.3 version is required, but can be newer – I'll use 4.0.1.2 version here) on MS Windows 7 and Oracle Database 11gR2 on Solaris 11.1.

 

Firstly, let's download appropriate JDBC driver from Oracle – I selected 11.2.0.3 version here (ojdbc6.jar):

Then, please copy the file to any convenient location – let's say, in my case, it will be: E:\JDBC_exp. I assume we have installed LibreOffice at this time – this is really straightforward process, so we don't have to go into the details:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 1

 

Next, start LibreOffice:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 2

 

We will require Oracle JDBC driver, so before any action we have to go to "Tools -> Options" and then, on the left pane, we have to open "LibreOffice" node and select "Advanced" leaf:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 3

 

Then, let's click "Class path" button for selected JDK (there is a list of available JDKs here):

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 4

 

Click "Add Archive" button and select path to the ojdbc6.jar file - E:\JDBC_exp\ojdbc6.jar:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 5

 

Then click "Ok" button – LibreOffice has to be restarted:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 6

 

Restart and then, from the main switchboard, select "Database" option:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 7

 

"Database Wizard" (step 1) window will be displayed – select "Connect to an existing database" option – there will be lots of drivers to be chosen, but we will use "Oracle JDBC":

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 8

 

Then we will click "Next" button. In step 2 of "Database Wizard" we have to provide connection information:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 9

 

Click "Test class" button to check that we correctly defined path to the Oracle JDBC driver:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 10

 

Then, click "Next" from step 2 of "Database Wizard" window. In step 3 we have to provide username (remember to check "Password required" checkbox):

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 11

 

We can now click "Test Connection" button to open "Authentication Required" window – our password for hr user was set in part 11 ("turing$man"). Type in password and then click "OK":

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 12

 

After successful connection we will see the following message:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 13

 

Click "Ok" and then "Next" (on the "Database Wizard", step 3):

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 11

 

Step 4 of "Database Wizard" will appear – just click "Finish":

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 14

 

"Save as" dialog window will be opened – provide database file name – "turingsmanLO":

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 15

 

Then click "Save" button and wait for a while – you'll see the full list of a tables accessible for hr user (however – yes – it should be definitely limited to hr schema only, but let's leave this issue for separate article). Open the node "HR" in the "Tables" pane:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 16

 

We can now work with LibreOffice Base the way we want – create tables, queries, forms, and reports:

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 17

 

It's "free", but there are two main problems: I'm not as fluent with LibreOffice Base as with MS Access and LibreOffice Base forms look like in the early nineties. Am I right? Although, it works – JDBC connection is established. We can also decide to use ODBC connection (as we did for MS Access in part 12):

 

LibreOffice Base to Oracle Database 11gR2 via JDBC, part 18

 

Having such environment we could make many more interesting experiments, however, that's all for now. I hope you liked the series :-)

 

Bookmark and Share

Comments   

 
0 #3 Cristian 2016-06-13 20:23
Is possible to link the result in a libreoffice calc file as is possible to do it in a Excel?

I have a sql sample and would like to use a libreoffice calc to show the result and work with the data!

Thanks
Quote
 
 
0 #2 Jason 2015-08-10 01:02
Thanks for help! :-)

100% function.
Quote
 
 
0 #1 Jason 2015-08-10 01:01
Thanks for help :D

100% function! :-)
Quote
 

Add comment


Security code
Refresh