Skip to main content

Connecting to HyperSQL with OpenOffice.org

For those of you who wished for a 'user-friendly' graphical interface for a HyperSQL database, your wait is over! OpenOffice.org Base is the preferred graphical environment for a HyperSQL database as OOo actually utilises HyperSQL as its embedded database engine.

Here's what you'll need:

And here's how to get it up and running:

1. Extract the downloaded HyperSQL bundle to a location on your local machine, e.g. C:\hsqldb-1.8.0.10
[optional]: Add the following entries to your system environment variables:
  • name: HSQLDB_HOME value: <path to your HyperSQL installation, e.g. C:\hsqldb-1.8.0.10>
  • name: PATH value: ;%HSQLDB_HOME%\lib; Note: This value should be added to your existing PATH value!

2. Install OpenOffice.org.

3. Configure OpenOffice.org's Java classpath. 
Open the OpenOffice.org launch pad dialog (on Windows: Start > Programs > OpenOffice.org X.X > OpenOffice.org).
Add your HyperSQL installation to the OpenOffice.org classpath settings: Tools > Options... > OpenOffice.org > Java and click on the Class Path... button (see below):

Click on Add Archive... and/or Add Folder buttons and add the hsqldb.jar and servlet.jar archives located in your HyperSQL \lib directory to OpenOffice.org's classpath settings.
You'll need to restart OpenOffice.org for the changes to take effect. Make sure to check in your taskbar (or in Windows Task Manager) for the OpenOffice.org QuickStarter Applet (look for an icon with little birds on it), otherwise OpenOffice.org won't exit fully.

4. Start the HyperSQL database server. 
Refer to the HyperSQL documentation (see: http://hsqldb.org/web/hsqlFAQ.html) or simply run the following command:
java -cp <path to your hsqldb.jar> org.hsqldb.Server -database.0 file:<path to your database .script file> -dbname.0 <database alias to use>
e.g.: java -cp C:\\hsqldb-1.8.0.10\\lib\\hsqldb.jar org.hsqldb.Server -database.0 file:C:\\Temp\\fndres\\resdb -dbname.0 resdb
Note: If the specified database instance doesn't exist, HyperSQL should generate a new instance for you. I've also outlined a convenient procedure for starting/stopping an HyperSQL database server is a previous post (see here).

5. Open a database connection.
Open OpenOffice.org Base and select Connect to existing database, then choose JDBC. Set the database connection parameters as follows:
Datasource URL: jdbc:hsqldb:hsql:<database url>;default_schema=true
JDBC driver class: org.hsqldb.jdbcDriver
User name: <database user>
where:
  • Database URL: refers to the URL of your database, e.g. //localhost/resdb. Note: The 'jdbc' protion of the Datasource URL is prefilled for you.
  • Database User: This is the database user accound to that OpeOffice.org should connect as, e.g. sa.
Once finished, you should be able to view/edit the database ina  similar fashion to Microsoft Access.

For more information, you can refer to the HyperSQL documentation here: http://hsqldb.org/doc/2.0/guide/openoffice-app.html

M.

Comments

Popular posts from this blog

Windows 7 Printer Registry

Here's today's annoyance: Adding a new network printer to Windows 7 failed to update the Windows registry properly. At work the other day I needed to add a new network printer. Pretty easy huh? After browsing for the network device, installing the correct driver and running of a test page I thought I was done. Apparently I was mistaken. Here's what happened after the printer was added: Applications such as Adobe Reader X fail to "see" the added printer. Applications such as Microsoft Word 2010 or Excel 2010 can "see" the printer (kinda) but will not let you select it. Could not set and/or change the default printer, fails with " Operation could not be completed (error 0x00000709). Double check the printer name and make sure that printer is connected to the network. ". Thinking there was something wrong with the network, printer driver and/or ports I (attempted to) uninstall/re-install the printer several times - ending up with severa...

Well, it's been a minute...

Holy crap, I can't believe that this blog still exists! 😮 I mean, I got some such notification that the Blogger app was shutting down and to be honest, I thought that this content had all been archived and removed from the interwebs ages ago. Well, colour me surprised that all I needed to do was to re-verify my user profile and voilà - it's all back in action. Well, as you may image, many, many things have happened in the interim: 2025 now finds us relocated yet again, this time all the way across the globe to Oxford, UK . I've also changed jobs from Company A , via Company T and I'm now working for Company B, with some role change and career growth thrown in for good measure. Oh, and we have somehow managed to aquire two dogs and, errm, five cats as well. Life is good. Anway, thanks for sticking around all this time. At least it's not as bad as waiting for The Winds of Winter ...