Using Firebird with Open Office and Windows

by Art Fore

Below is a basic howto on using the Firebird Databae with OOo. I will also be trying this in Linux in the near future.

I like Firebird over Postgresql or MySQL for the following reasons.

  • MySQL does not have stored views or queries and will not have for at least a year or so.
  • Firebird (InterBase) is the most mature of the three databases.
  • Firebird was the easiest install both Windows and Linux, but the most difficult to interface to OOo.
  • A Firebird database is portable, that is, you can copy the database to another computer and operate on it (Intel architectures). Otherwise use the transportable backup and restore.
  • You also have client server capabilities as with Postgresql and MySQL that far exceeds the client-file database of Access .mdb. Even with Access 2000 where you have a stripped down SQL databaase of 2Gb max size, Firebird still has greater capabilites.
  • There are a great many opensource and/or freeware tools (as well as commercial) available for Firebird.

Since there have been so many complaints and requests for better database capabilites with OOo, I would like to see and work together and integrate the two together. The installation and setup needs to be streamlined with a gui etc. for people who are not computer literate, but at the same time, there is no need to "re-invent the wheel" with another database since one is already available (OpenSource GPL that is).

I hope that some of you will try it and give some feedback to both OOo and Firebird. (I tried a couple of the ODBC drivers which worked in Access but not in OOo. Would connect, but edit table or new query would crash OOo and all of the table names have small boxes after them at the end of the line)

Installation Prerequisites

Installation was on Win2k with OOo 643c.

If Java was not installed when OOo was installed, it must be installed and you will need to re-install OOo.

Download the following:

  • Firebird for Windows
  • JayBird Type 4 JDBC Driver

Run Firebird Executable Installer and install the database. It will also start the services. Default install directory is /Program Files/Firebird.

Open the in winzip and extract all of the file to /Program Files/Firebird/Java (you will have to create this new directory)

Open OOo writer, goto Tools, Options, Security. In the Java section, Class Path, click on the browse button and browse to /Program File/Firebird/Java. Select each of the jar files and open. Also the File/Firebird/Java/lib jar files. Then click OK.

Goto Tools, Data Sources and select New Data Source. Enter the following info into the General tab.

Name: what ever you want to call the database. I called mine Firebird.

Database Type: JDBC

Data Source URL: jdbc:firebirdsql:localhost/3050:c:\Program Files\Firebird\examples\employee.gdb (Modify the path to where your database is, \ are important.)

Goto the JDBC tab and enter the following information (This assumes you are using the defualt password and employee database)

JDBC driver class: org.firebirdsql.jdbc.FBDriver

URL: This should already be filled in with the previously entered info on the General TAB.

User name: SYSDBA

Password required: Should be checked.

Select the Tables tab. A dialog box will ask for the password. enter "masterkey" and click OK.

You should now see a list of all of the tables. Click the Edit Table icon, you can see the fields, etc.

Select the Queries tab, and you can create a query similar to Access.

If you do not get a connection, you can download IB_SQL.exe . It is in zip format, so I unzipped the IB_SQL.exe to the c:Program FilesFirebird and executed it.

On the Login tab, Database, browse to the database c:Program FilesFirebirdexamplesEMPLOYEE.gdb and select. Username and password should already be filled in, if not, they are sysdba and masterkey.

Then select the Connect Database icon (second from the left)

Then select the Browse database idcon (third from the left)

You should see the tables.

If you do not see the tables, then the database did not properly install. If you see the tables here but not in OOo, then there is a problem with JAVA. You may have to re-install OOo which is what I had to do. I just did an uninstall, but did not delete files, the did an install and made sure the java was found. After that, it worked.

Good Luck