ODBC Connections

Top  Previous  Next

ODBC Connection to Firebird Database

 

You may connect to Firebird databases using an ODBC Connection. This allows you to connect 3rd party database utilities (such as MS Access or Crystal Reports) directly to the database.

 

Important Notes:

 

Perform read-only operations only, and make a backup of your database before attempting any direct database connections.
Do not change the database schema or add new database views based on existing views. Future software updates may fail if a database view contains unexpected dependencies from a custom user-created database view.

 

An ODBC driver is available at the following links:

 

Firebird ODBC Driver (32 Bit Windows)

Firebird ODBC Driver (64 Bit Windows)

 

Or check this page on the Firebird website for updated drivers and additional support.

 

After installing a Firebird ODBC Driver, follow the steps below to create an ODBC connection.

 

Create an ODBC Connection in Windows

 

Step 1: Add a new data source using the Firebird driver in the Windows ODBC Data Source Administrator.

 

ODBCAdmin

 

This control panel applet is available in Windows Administrative Tools.

 

Step 2: Select your data source and then click the Configure button to configure the settings:

 

FirebirdODBCConfiguration

 

Example Connection to a remote Training Manager database. For Asset Manager or Vehicle Manager,

replace "Training" with "Asset" or "Vehicle".

 

Settings:

 

Database:
- For a local file database, select the database file (e.g. TrainingManager.tdb, VehicleData.vdb, or AssetManager.adb). In the file browser window, select "All Files" to remove the *.fdb filter from the file selection box.
- For a remote database, enter the name of the server and the name of the database alias separated by a colon (no spaces).
Client: Enter path to fbclient.dll. The fbclient.dll file can be found in the installation folder / odbc directory, or it can be downloaded here (FBClient2.1.7). Be sure to match the "bitness" (32 bit or 64 bit client).
Database Account: SYSDBA
Password: masterkey
Role: [leave blank]
Extended Identifier properties: quoted identifiers
Character Set: UTF8
Dialect: 3

 

Firebird ODBC Connection Troubleshooting

 

Problem: Cannot open database

 

Solution: Match 32 bit or 64 bit for all components:

 

1. ODBC Driver

2. ODBC Admin program

3. fbclient

4. Any 3rd party utilities such as MS Access, Crystal Reports, etc.

 

It gets confusing on 64 bit Windows 7 because there are two versions of the ODBC admin program. Oddly, the 32

bit version is stored in the SysWOW64 directory, while the 64 bit version is stored in the System32 directory:

 

The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%\Windows\System32 folder.

 

Problem: “Tables not found” message in Crystal Reports.

 

Solution: Set the "Overidden Qualified Table Name" in the Properties for each table in the Crystal Reports set database dialog. Note that table names are case sensitive.