IBPhoenix Open Source ODBC Driver (aka Firebird ODBC driver) connection strings

Firebird

Specifying dialect Firebird

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;DBNAME=C:\database\myData.fdb;DIALECT=3;

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;DBNAME=C:\database\myData.fdb;AUTOQUOTED=YES;

'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 (Firebird)

This one is for Firebird file with the .fdb extension.

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.fdb;READONLY=YES;

Return with error on lock conflict (Firebird)

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.fdb;NOWAIT=YES;

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

Wait timeout for error on lock conflict (Firebird)

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.gdb;LockTimeoutWaitTransactions=4;

Normally the transaction will wait if it encounters a lock conflict. This connection string will raise an error after 4 seconds.

Interbase

Local database Interbase

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.gdb;

(the file extension for the data file could also be .ib)

Specifying dialect Interbase

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;DBNAME=C:\database\myData.gdb;DIALECT=3;

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;DBNAME=C:\database\myData.gdb;AUTOQUOTED=YES;

'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 (Interbase)

This one is for Interbase file with the .gdb extension.

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.gdb;READONLY=YES;

Return with error on lock conflict (Interbase)

DRIVER=Firebird/InterBase(r) driver;UID=SYSDBA;PWD=masterkey;DBNAME=C:\database\myData.gdb;NOWAIT=YES;

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