Connection strings for Firebird

Firebird ADO.NET Data Provider

Type .NET Framework Class Library
Manufacturer Firebird


Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;
MaxPoolSize=50;Packet Size=8192;ServerType=0;

IBPhoenix Open Source ODBC Driver (aka Firebird ODBC driver)

Type ODBC Driver
Usage Driver=Firebird/InterBase(r) driver
Manufacturer IBPhoenix

Local database

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

Remote connection

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

The default TCP/IP port 3050 will be used.


Specifying TCP/IP port number

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

Using alias (aliases.conf)

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=aliasname;

Example record in aliases.conf, aliasname = C:\database\myData.fdb


Using alias (aliases.conf) for remote connections

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

Specifying dialect

SQL dialects were introduced in InterBase 6.0, to support a number of new SQL features including delimited identifiers.

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

DIALECT=1 - Parser processes as it did in InterBase V5.

DIALECT=2 - Transitional flagger. InterBaseV6, and Firebird flags ambiguous SQL constructs and issues an error or warning message.

DIALECT=3 - Parser processes anything delimited by single quotes as string constants and any thing delimited by double quotes as SQL delimited identifiers.


Autoquote identifiers

The driver will quote (") your table names in SQL statements automatically.

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

'SELECT A.Field FROM Table A' will be transformed into 'SELECT "A.Field" FROM "Table" A'

Be aware that upper case SQL keywords must be used, ie SELECT and FROM etc, not Select and From, else transformation will fail.


Read Only connection

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

Return with error on locking conflict

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;

Normally the transaction will wait if it encounters a lock conflict. This connection string will cause an error instead.


.NET Framework Data Provider for ODBC

Type .NET Framework Wrapper Class Library
Usage System.Data.Odbc.OdbcConnection
Manufacturer Microsoft

Use an ODBC driver from .NET

Driver={any odbc driver's name};OdbcKey1=someValue;OdbcKey2=someValue;

See the respective ODBC driver's connection strings options. The .net OdbcConnection will just pass on the connection string to the specified ODBC driver. Read more here.