FirebirdSQL logo

The kit that you install will depend on what you plan to use it for. Regardless of whether you intend to connect to a 64-bit or a 32-bit Firebird server, you must install the driver and the Firebird client (fbclient.dll on Windows, libfbclient.so on Linux) that matches the “bitness” of your client application.

Installation is similar for both options. You can install both the 32-bit and the 64-bit driver on the same machine if the user is going to access Firebird from multiple applications of mixed bitness. Care will be needed to ensure that each application will connect using the correct DSN for the required driver.

Note
Note for the Less Technically Versed

...because we have been asked: if you want to connect your Windows application — Excel or LibreCalc, for example — to your database running on a Linux or other POSIX server, you want the Windows driver, not the POSIX one. See also the note below about the Firebird client library.

Downloading the Driver

The Downloads section at https://www.firebirdsql.org/en/odbc-driver/ clearly identifies the bitness of the various kits available, with the latest release at the top of the page. For example, the 32-bit installer kit for Windows, at the time this document was prepared, was named Firebird_ODBC_2.0.5.156_Win32.exe, indicating that it is the executable installer for the 32-bit version. The following table should help to indicate what you will need. The “N.n.n.xxx” infix used here indicates “Major1.Major2.Minor.Subrelease”. The “Subrelease” part changes the most frequently.

Table 1. Firebird ODBC/JDBC Driver Kits
Kit Name Purpose

OdbcJdbc-src-N.n.n.xxx.tar.gz

Source code, which is bitness-independent. Recommended for POSIX installs with unusual rules about the location of libraries — instructions below.

Firebird_ODBC_N.n.n.xxx_Win32.exe

Executable installer for use with 32-bit client applications. Use this for an initial installation.

Firebird_ODBC_N.n.n.xxx_x64.exe

Executable installer for use with 64-bit client applications. Use this for an initial installation.

OdbcFb_DLL_N.n.n.xxx_Win32.zip

Zip kit containing just the dynamic and static 32-bit libraries and documentation. This can be used to update the library of an existing installation when the driver is not active. On a 64-bit machine, the older version can be found in the folder c:\Windows\SySWOW64 and Administrator privileges will be required to overwrite it.

OdbcFb_DLL_N.n.n.xxx_x64.zip

Zip kit containing just the dynamic and static 64-bit libraries and documentation. This can be used to update the library of an existing installation when the driver is not active. On a 64-bit machine, the older version can be found in the folder c:\Windows\system32 and Administrator privileges will be required to overwrite it. It will not work on a 32-bit machine.

OdbcFb-LIB-N.n.n.xxx.i686.gz

32-bit binary for a POSIX client, gzipped

OdbcFb-LIB-N.n.n.xxx.amd64.gz

64-bit binary for a POSIX client, gzipped

Getting the Right Firebird Client Library

All Firebird RDBMS kits contain at least one version of the Firebird client library. If there is only one, then it will have the same “bitness” as the server installation kit itself.

Important

Make sure you get the fbclient library that has the same major version number as the server it is going to connect with.

  • On a 32-bit Windows installation, fbclient.dll is in Firebird’s bin folder in Firebird versions lower than version 3.0. For version 3.0 and above, it is in Firebird’s root folder, e.g. C:\Program Files (x86)\Firebird\Firebird\Firebird_3_0, or wherever Firebird was installed.

  • On a 64-bit Windows installation, the version of fbclient.dll in Firebird’s bin folder (or Firebird’s root folder for version 3.0 and higher) is the 64-bit one. In some builds, the 32-bit client is located in a folder, named either WOW64 or system32, that is beneath Firebird’s root.

    If your ODBC DSN setup is going to need the 32-bit fbclient.dll and it is not there, you will need to download the 32-bit Windows .zip kit from the main Firebird download page, extract the 32-bit client from it and place it in the same folder as your application. An alternative is to download the 32-bit installer instead and perform a client-only install, configuring the installer to place it where you want it to be.

  • The POSIX server kits always come with only the matching libfbclient.so. You will need to extract it from an .i686 kit if your POSIX client application is 32-bit.

Have the client library in its proper place before installing the driver and configuring the DSN.

Note
Compatibility of the Driver with Firebird Versions

The most current version of the ODBC/JDBC driver is expected to be compatible with any supported version of Firebird.

Installing the Driver on Windows

If you are doing a first-time install of the driver, or if you have uninstalled an older version, it is recommended that you use the executable installer. These instructions will assume that you are installing the 32-bit driver, but the procedure is the same for installing the 64-bit one. Under the hood, the 32-bit driver library will be installed into \windows\sysWOW64 on a 64-bit Windows. Any other install will place the driver in windows\system32.

Download or move the executable installer kit to the desktop. Right-click on it and select menu:Run as Administrator[].

fb odbc installer on desktop
Figure 1. ODBC driver installer on the desktop

Click your way through the screens until you reach the one in which you configure your preferences for the installation:

fb odbc installer 001
Figure 2. ODBC driver installer screens

If you want or need to, you can have the driver installed in some other location than the one offered by the installer as the default. Use the btn:[Browse] button to find the location where you want to have the driver installed.

Note

The installer will create the \Firebird_ODBC subfolder if it does not exist already.

Lastly, the installer will display the configuration you have chosen. If you happy with it, just click btn:[Install] and it is done.

fb odbc installer 002
Figure 3. ODBC driver installer final screen
Note

You might observe here that, on our system, we keep our own dedicated “Programs64” and “Programs32” folders under C:\Windows. That is simply preference as to how we organise our server and monitor the volume of stuff installed by Windows updates into its own program folders.

The .chm and .html documents noted on that screen are older evolutions of this document that are still built in with the kits at the point of this writing.

Installing the Driver on Linux

Pavel Cisar

There are two prerequisites for installing the ODBC/JDBC driver on Linux:

  • The “unixODBC” package must be installed

  • Firebird must be installed, initially at least, for testing the installation

Unpacking the Files

The ODBC/JDBC driver packages for Linux are gzipped tar files. After gunzip they should be processed by tar, or you can rename them to .tar.gz and use a tool such as Midnight Commander to unpack them.

Building from Sources

Building from source code (recommended), requires the development package for unixODBC. Proceed with the following steps:

  1. Download and unpack the Firebird driver sources

  2. Rename makefile.linux in .source/Builds/Gcc.lin to makefile

  3. Set the evironment variables FBINCDIR (Firebird include directory) and FBLIBDIR (Firebird lib directory) if necessary.

  4. Run make which will create the library libOdbcFb.so in a subdirectory

  5. It is possible to copy the library to /usr/local/lib64 or any preferred directory; or run make install to symlink the library from the unixODBC directory

Installing the Binary Package

To install from the binary package, copy libOdbcFb.so to /usr/local/lib64, /usr/local/lib32 or any other desired destination directory, as appropriate.