AnyDAC
ContentsIndexHome
PreviousUpNext
Connect to Interbase or Firebird

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

Group
Links
Supported versions

The AnyDAC native driver supports:

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

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

 

Windows client software

AnyDAC 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 (details) 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 AnyDAC\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: 

 

[AnyDAC][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

AnyDAC 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

AnyDAC requires:

  • the libfbclient.dylib x86 client library.

You can take it from a server (details) installation /Library/Frameworks/Firebird.framework/Libraries folder. 

 

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 (AnyDAC) 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.
 
  • C:\ib\ADDEMO_IB2007.IB
  • 127.0.0.1:C:\ib\ADDEMO_IB2007.IB
  • \\MySrv\C:\ib\ADDEMO_IB2007.IB
 
OSAuthent 
If yes, use windows authentication, otherwise use DBMS authentification. 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 - AnyDAC 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 - AnyDAC 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, AnyDAC 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 
Specify Yes to create a new database file, specified in the Database parameter, right after connecting to the server. No is the default value. 
Yes 
DropDatabase 
Specify Yes to drop the database file, specified in the Database parameter, right after disconnecting from the server. No 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
What do you think about this topic? Send feedback!