Databases - Delphi - Connecting to a Firebird (Interbase) Database

Firebird is an open source (free) version of Borland's Interbase SQL database engine. There are Several different ways to access tables According to Borland, there will not be any further changes to the BDE (Borland Database Engine), as a result, it should not be used in new designs.


So far, I have not gotten ODBC to work using an Interbase ODBC driver with the Firebird Server.

In order to access an *.gdb (or *.fdb) file,

I got lots of errors related to the Workgroup information file, but, of course, there is no help on what that may mean.

Using the Interbase Components

In order to access an *.gdb file, Be sure not to set IBTable1.MasterSource to DataSource1 - if you do, you get the following error Instead of IBTable, you can use IBDataSet and set SelectSQL to Or you can use IBClientDataSet and set CommandText to the query.


dbExpress is Borland's new way to connect to SQL databases - supposedly, only one additional *.dll (dbexpint.dll) is required on the client systems in order to connect to an Interbase/Firebird database. (Well, that's what the documentation says.)

(dbExpress is available with Delphi 6 Pro and Delphi 7 Pro, but not with Delphi 5 Pro.)

The first problem is that dbExpress produces a link to a "unidirectional" database - this causes the DataGrid to not work. The solution with Delphi 6 was to use a TClientDataSet which buffers data in memory so that bidirectional access is simulated.

It turns out that Delphi 7 requires an additional TProvider component.

It was also not clear from the documentation how to configure the TClientDataSet. The solution is to set xx to one of these - table, query, storedProc - and to set xx to an appropriate value.

Well, I eventually got this to work. Then I tried to get the *.exe to run on a machine that did not have Delphi 7 installed.

Notice - Delphi 6 does not require the xxx component. That means that code written for Delphi 6 must be modified before it will compile with Delphi 7.

Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / Databases / Delphi / Database_Connections_firebird.html