Firebird Documentation IndexFirebird 3.0 Developer's GuideDeveloping Firebird Applications in Delphi → Path to the Client Library
Firebird Home Firebird Home Prev: TFDConnection ComponentFirebird Documentation IndexUp: Developing Firebird Applications in DelphiNext: Connection parameters

Path to the Client Library

Table of Contents

Developing for Embedded Applications

We will place the necessary library in the fbclient folder located in the application folder and use the following code for the OnCreate event of the data module:

xAppPath := ExtractFileDir(Application.ExeName) + PathDelim;
FDPhysFBDriverLink.VendorLib := xAppPath + 'fbclient' + PathDelim + 'fbclient.dll';
      

Important notes about “bitness

If you compile a 32-bit application, you should use the 32-bit fbclient.dll library. For a 64-bit application, it should be the 64-bit library.

Along with the file fbclient.dll, it is advisable to place the following libraries in the same folder: msvcp80.dll and msvcr80.dll (for Firebird 2.5) as well as msvcp100.dll and msvcr100.dll (for Firebird 3.0). These libraries are located either in the bin subfolder (Firebird 2.5) or in the root folder of the server (Firebird 3.0).

For the application to show internal firebird errors correctly, it is necessary to copy the file firebird.msg as well.

  • For Firebird 2.5 or earlier, the libraries must be one level up from the folder with the client library, i.e., in the application folder for our purposes.
  • For Firebird 3, they must be in the same folder as the client library, i.e. in the fbclient folder.

Developing for Embedded Applications

If you need your application to run without the installed Firebird server, i.e. in the Embedded mode, for Firebird 2.5 you should replace fbclient.dll with fbembed.dll. Make sure that the width of the CPU register (64-bit or 32-bit) matches the application. If necessary, the name of the library can be placed in the configuration file of your application.

It is not necessary to change anything for Firebird 3.0, in which the working mode depends on the connection string and the value of the Providers parameter in the file firebird.conf/databases.conf.

TIP

Even if your application is intended to work with Firebird in the Embedded mode, it is advisable to attach to the full server during development. The reason is that embedded Firebird runs in the same address space as the application and any application connecting to a database in embedded mode must be able to obtain exclusive access to that database. Once that connection succeeds, no other embedded connections are possible. When you are connected to your database in the Delphi IDE, the established connection is in Delphi's application space, thus preventing your application from being run successfully from the IDE.

Note, Firebird 3 embedded still requires exclusive access if the installed full server is in Super (Superserver) mode.

Prev: TFDConnection ComponentFirebird Documentation IndexUp: Developing Firebird Applications in DelphiNext: Connection parameters
Firebird Documentation IndexFirebird 3.0 Developer's GuideDeveloping Firebird Applications in Delphi → Path to the Client Library