FireDAC
ContentsIndexHome
PreviousUpNext
Connect to Interbase or Firebird

Describes how to connect to Firebird or Embarcadero Interbase Server's.

Group
Links
Supported versions

The FireDAC native driver supports:

  • Embarcadero InterBase server version 6 and higher;
  • Firebird server version 1.5 and higher. Embedded edition is also supported.

FireDAC distinguishes these DBMS brands and adjusts its own behavior to the connected database. It does not officially support Jaffil. 

 

Windows client software

FireDAC requires the following x86 or x64 client software to be installed on the workstation:

  • FBCLIENT.DLL library to connect to the Firebird server. You can take it from a server (download) installation Bin folder.
  • FBEMBED.DLL library to work with the database using the Firebird Embedded server (details).
  • GDS32.DLL library to connect to the InterBase server.

Note: It is critical to use the appropriate DLL for the DBMS client library. Do not use GDS32.DLL with Firebird or FBCLIENT.DLL with Interbase. 

You can put the required files into a folder:

  • listed in your PATH environment variable (for example, <Windows>\SYSTEM32);
  • your application EXE folder;
  • any other folder and specify in FireDAC\DB\ADDrivers.ini:

 

[IB]
VendorLib=<folder>\fbclient.dll

 

When the Interbase or Firebird client library has not been properly installed, you will get an exception when you try to connect: 

 

[FireDAC][Phys][IB]-314. Cannot load vendor library [gds32.dll]. The specified module could not be found.
Check [gds32.dll], which is located in one of the PATH directories or in the application EXE directory.

 

Linux client software

FireDAC requires:

  • the libfbclient.so x86 or x64 client library.

To install on Linux use the commands: 

 

sudo apt-get update
sudo apt-get install libfbclient2
sudo ln -s /usr/lib/libfbclient.so.2.5.0 /usr/lib/libfbclient.so

 

Mac OS X client software

FireDAC requires:

  • the libfbclient.dylib x86 client library to connect to Firebird server. You can take it from a server (download) installation /Library/Frameworks/Firebird.framework/Libraries folder.
  • the libgds.dylib x86 client library to connect to Interbase server. With RAD Studio XE4 use Project -> Deployment -> Add Featured Files -> Interbase Client\OSX32.
  • the libibtogo.dylib x86 embedded Interbase server. With RAD Studio XE4 use Project -> Deployment -> Add Featured Files -> Interbase ToGo\OSX32.

 

iOS client software

FireDAC requires:

  • For iOS Simulator - the libibtogo.dylib x86 embedded Interbase server. With RAD Studio XE4 use Project -> Deployment -> Add Featured Files -> Interbase ToGo\iOSSimulator.
  • For iOS Device - the libibtogo.a embedded Interbase server as ARM static library. With RAD Studio XE4 use Project -> Deployment -> Add Featured Files -> Interbase ToGo\iOSDevice.

Note, that it is impossible to choose the linkage mode. 

 

Driver linkage

To link the driver:

 

Connection definition parameters

To connect to the Interbase or Firebird DBMS, most applications will need to specify DriverID, Protocol, Server, Database, User_Name, Password and CharacterSet

We strongly recommend to explicitly set the CharacterSet to:

  • UTF8, if your application needs to support Unicode. See Unicode Usage (FireDAC) for details.
  • WIN1250 for Central Europe;
  • WIN1251 for Cyrillic;
  • WIN1252 for Western Europe, America;
  • etc

 

DriverID=IB

Parameter 
Description 
Example value 
Database 
The database name to attach. The value may be:
  • database file path;
  • full database path, including server address.
For an embedded database a path may include path variables
  • C:\ib\ADDEMO_IB2007.IB
  • 127.0.0.1:C:\ib\ADDEMO_IB2007.IB
  • \\MySrv\C:\ib\ADDEMO_IB2007.IB
 
OSAuthent 
Controls authentication mode:
  • Yes - use windows authentication;
  • No - use DBMS authentication. It is the default value.
See the doc\README.trusted_authentication.txt for details. 
Yes 
User_Name 
The user name. 
sysdba 
Password 
The user password. 
masterkey 
CharacterSet 
The character set to use. 
WIN1252 
ExtendedMetadata 
Controls extended describing of the query result sets:
  • True - FireDAC is getting column domain names additionally to the other column attributes. If a column belongs to a domain with a name like %BOOL%, it will be described as a dtBoolean. Also, if a table has an INSERT trigger, which reads a single sequence and assigns it value to a single column, then this column will be described as auto-incrementing one. Setting this option to True will slightly slow down a dataset opening.
  • False - FireDAC uses the restricted information about the query columns. It is the default value.
 
False 
Protocol 
The protocol used to connect to the DB server. It may be one of the following values:
  • Local. Connect to a locally running server, to an embedded server or to a server using an alias.
  • NetBEUI. Connect using Microsoft NetBIOS protocol.
  • SPX. Connect using Novel SPX protocol.
  • TCPIP. Connect using TCP/IP protocol.
If the Protocol parameter is specified, FireDAC will build full database paths, using the appropriate Protocol format and Server and Database parameter values.
 
TCPIP 
Server 
Server address to connect to. Server parameter value is used only if the Protocol parameter is specified. To specify a TCP/IP port number use the <host>/<port> notation. 
  • 127.0.0.1
  • my_host/3055
 
InstanceName 
The Interbase 2007 instance name. 
srv2 
SQLDialect 
The SQL Dialect to use for connecting. Three is the default value. 
RoleName 
The default role name. 
Admin 
CreateDatabase 
Controls a new database create:
  • Yes - to create a new database file, specified in the Database parameter, right after connecting to the server.
  • No - do not create. It is the default value.
 
Yes 
DropDatabase 
Controls an existing database deletion:
  • Yes - to drop the database file, specified in the Database parameter, right after disconnecting from the server.
  • No - do not drop. It is the default value.
 
Yes 
PageSize 
The page size used for the newly created database, if CreateDatabase = Yes. 1024 is the default value. 
4096 
IBAdvanced 
The ';' separated list of additional parameters. You can find the full list of supported parameters in the uADPhysIBWrapper unit, searching for the DPBInfos constant array. You can find the description of each Code listed there in the Interbase/Firebird manuals. 
 

 

Usage cases

  • Connect to a database running on a remote server via TCP/IP protocol:

 

DriverID=IB
Database=C:\ib\ADDEMO_FB21.FB
Protocol=TCPIP
Server=IBSrv
User_Name=sysdba
Password=masterkey
CharacterSet=win1252
ExtendedMetadata=True

 

  • Connect to a database running on a remote server via TCP/IP protocol:

 

DriverID=IB
Database=IBSrv:C:\ib\ADDEMO_FB21.FB
User_Name=sysdba
Password=masterkey
CharacterSet=utf8

 

  • Connect to a local database:

 

DriverID=IB
Database=C:\ib\ADDEMO_FB21.FB
User_Name=sysdba
Password=masterkey
CharacterSet=win1251

 

  • Connect to a Firebird Embedded database:

Drop the TADPhysIBDriverLink component to the form and set its VendorLib to <your path>\fbembed.dll or use virtual driver definition. 

 

DriverID=IB
Database=C:\ib\ADDEMO_FB21.FB
User_Name=sysdba
CharacterSet=utf8

 

  • Connect to a Interbase server using SSL:

For details on that see Chapter 5, starting in page 5-15 of the InterBase XE Operations Guide manual. 

 

DriverID=IB
Database=my.interbasehost.net/3065?ssl=true?serverPublicFile=C:\PublicCertFileOnClient\CertFile.pem??:C:/DB/TEST.IB
User_Name=sysdba
Password=masterkey
CharacterSet=UTF8
ExtendedMetadata=True

 

  • Connect to a database file in Documents folder on iOS device or emulator:

 

DriverID=IB
User_Name=sysdba
Password=masterkey
Database=$(DOC)/ADDEMO.GDB
SQLDialect=3
CharacterSet=UTF8
ExtendedMetadata=True
What do you think about this topic? Send feedback!