In terms of the Easysoft ODBC-Firebird Driver, the client is the machine running the ODBC application with which you want to access data on your Firebird server.
To allow an ODBC application on the client machine to access data on the remote server, you need to create a data source on the client.
Instructions for installing the Easysoft ODBC-Firebird Driver on Windows and Unix platforms are provided in Installation.
To connect an ODBC application on a Windows machine to an Firebird database on a remote server:
1. In Control Panel, double-click Administrative Tools and then Data Sources (ODBC).
The ODBC Data Source Administrator dialog box is displayed:
4. Select Easysoft Firebird ODBC and click Finish.
For details of the other attributes that can be set on this dialog box, see Attribute Fields.
The Easysoft installer program installs both a 32-bit and a 64-bit version of the Easysoft ODBC-Firebird Driver. If you want to use a 64-bit ODBC application, you need to use the 64-bit Easysoft ODBC-Firebird Driver. If you want to use a 32-bit ODBC application, you need to use the 32-bit Easysoft ODBC-Firebird Driver.
There is both a 32-bit and a 64-bit version of ODBC Administrator. The 64-bit ODBC Administrator is located in Control Panel under Administrative tools. To access the 32-bit ODBC Administrator, in the Windows Run dialog box, type:
Easysoft ODBC-Firebird Driver data sources created in the 64-bit ODBC Administrator will specify the 64-bit version of the Easysoft ODBC-Firebird Driver. Easysoft ODBC-Firebird Driver data sources created in the 32-bit ODBC Administrator will specify the 32-bit version of the Easysoft ODBC-Firebird Driver.
System data sources created in the 64-bit ODBC Administrator are only visible to 64-bit applications. If you want to create an Easysoft ODBC-Firebird Driver System data source for use with a 64-bit application, use the 64-bit ODBC Administrator therefore. Likewise, System data sources created in the 32-bit ODBC Administrator are only visible to 32-bit applications.
(The reason for this is that System data sources created in the 64-bit ODBC Administrator are stored in a registry key called HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI. System data sources created in the 32-bit ODBC Administrator are stored in a registry key called HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI. The WOW64 layer intercepts registry calls to HKEY_LOCAL_MACHINE\Software that are made by 32-bit applications, and then redirects them to the HKEY_LOCAL_MACHINE\Software\WOW6432node key.)
User data sources are visible to both 32-bit and 64-bit applications, irrespective of the version of ODBC Administrator they were created in. If a 64-bit application connects to an Easysoft ODBC-Firebird Driver User data source created in the 32-bit ODBC Administrator, it will load the 64-bit version of the Easysoft ODBC-Firebird Driver. Likewise, a 32-bit application that connects to a 64-bit Easysoft ODBC-Firebird Driver data source will load the 32-bit version of the Easysoft ODBC-Firebird Driver.
1. Using the sample DSN entry created during the install as a template, create a DSN entry in the driver manager odbc.ini file. The entry will look something like the following.
2. Amend the Database, User and Password attributes in the new odbc.inisection to suit your specific user installation.
Description = Easysoft Firebird ODBC Driver
4. Amend the Driver and Setup attributes to the reflect the install directory you chose in step 14.
|DSN Dialog Box (Windows)||DSN|
|odbc.ini file (Unix)||[value]|
|DSN Dialog Box (Windows)||Description|
|odbc.ini file (Unix)||Description=value|
|Connect String||Not Used|
|DSN Dialog Box (Windows)||Database|
|odbc.ini file (Unix)||Database=connection_string|
|db_file||Local||c:\program files\firebird\firebird_2_1\examples\empbuild\employee.fdbConnects to the sample Firebird database on Windows. The Firebird database server is installed on the same machine as the Firebird client./opt/firebird/examples/empbuild/employee.fdbConnects to the sample Firebird database on Linux/Unix. The Firebird database server is installed on the same machine as the Firebird client.|
|server:db_file||TCP/IP||my_remote_database_server:c:\program files\firebird\firebird_2_1\examples\empbuild\employee.fdbConnects to the sample Firebird database on Windows. The Firebird database server is installed on a different machine (my_remote_database_server) to the Firebird client.192.168.0.10:/opt/firebird/examples/empbuild/employee.fdbConnects to the sample Firebird database on Linux/Unix. The Firebird database server is installed on a different machine (192.168.0.10) to the Firebird client.|
As this type of connection is made in the process context of the client application, it can fail if the privileges of a user do not permit database access (e.g. if the connection is being made by a Web Server).
The client process uses a network protocol to connect to a server process, which then connects to the server database, so avoiding many problems with permissions encountered when connecting to a local database.
|DSN Dialog Box (Windows)||User Name|
|odbc.ini file (Unix)||User=value|
If a value is specified in the connect string then any entry in the DSN will be ignored (see UID Override).
|DSN Dialog Box (Windows)||Password|
|odbc.ini file (Unix)||Password=value|
If a value is specified in the connect string then any entry in the DSN will be ignored (see UID Override).
|DSN Dialog Box (Windows)||Role|
|odbc.ini file (Unix)||Role=value|
|DSN Dialog Box (Windows)||With Schema|
|odbc.ini file (Unix)||With_Schema=0|1|
To avoid this, the default behavior of the Easysoft ODBC-Firebird Driver is to not return this information from metadata calls (such as SQLTables) unless this attribute is selected.
|DSN Dialog Box (Windows)||No Wait|
|odbc.ini file (Unix)||Nowait=0|1|
|DSN Dialog Box (Windows)||Dialect|
|odbc.ini file (Unix)||Dialect=1|2|3|
See Leave Quotes for details of how amending the value of this attribute may also affect the way in which the Easysoft ODBC-Firebird Driver converts certain SQL strings.
|DSN Dialog Box (Windows)||Pre IB6 MetaData|
|odbc.ini file (Unix)||OldMetaData=0|1|
However, in versions of InterBase prior to version 6, this column would have been stored in a double precision field, which cannot supply a fixed precision value, so the metadata for this version contains a column length only (8 in the case of a double precision field), rather than the precision value.
The Easysoft ODBC-Firebird Driver will convert the length value into a precision value, but in this case it would not be a 10, but an 18, this being the maximum precision that could be stored in the field.
In most cases the Easysoft ODBC-Firebird Driver will attempt to determine if the metadata contains a precision value without help, but there are some InterBase version 6 databases that do not have the precision value.
Whether stored procedures should be called by using a Select or an Execute statement. If you are calling an Executable procedure, enable Execute Proc (check the attribute or set it to 1). Otherwise, leave Execute Proc set its default value OFF (set to 0 or clear)
|DSN Dialog Box (Windows)||Execute Proc|
|odbc.ini file (Unix)||ExecProc=0|1|
Execute Proc allows applications to call either type of procedure by using the standard ODBC escape sequence. For example:
The Easysoft ODBC-Firebird Driver will generate a virtual result set consisting of a single row that contains any output values from the procedure. Unless the driver does this, applications that call SQLFetch following an executable procedure call can cause the Firebird server process to fail.
If an application uses a direct Firebird stored procedure call (rather than the ODBC escape sequence), the Easysoft ODBC-Firebird Driver will adapt to match that usage when Execute Proc is enabled.
Instructs the Easysoft ODBC-Firebird Driver to strip double quotes from any SQL string if the SQL Dialect attribute (see SQL Dialect) is set to 1 or 2.
|DSN Dialog Box (Windows)||Leave Quotes|
|odbc.ini file (Unix)||DQuote=0|1|
Double quotes are used to quote identifiers (in this case column names) and single quotes are used to create character literals (normally values with a type of SQL_VARCHAR) containing printable characters.
This can cause problems with applications that use quotes around column and table names, because even though the Easysoft ODBC-Firebird Driver is queried as to the character to use for quoted identifiers, at least one application (Microsoft Access) fails if the application is instructed not to use any character for this purpose.
Allows the user and password information passed in as part of the connect string in the SQLDriverConnect function and the user and password used in the SQLConnect function to be overridden by the values in the DSN or .ini file.
|DSN Dialog Box (Windows)||UID Override|
|odbc.ini file (Unix)||UIDOverride=0|1|
|Connect String||Not Used|
This functionality is useful as some applications (e.g. Seagate Crystal Reports in server mode) will pass the Windows (rather than the Firebird) user name and password to the Easysoft ODBC-Firebird Driver.
|DSN Dialog Box (Windows)||Read Only|
|odbc.ini file (Unix)||ReadOnly=0|1|
|DSN Dialog Box (Windows)||Character Set|
|odbc.ini file (Unix)||Charset=value|
|DSN Dialog Box (Windows)||Commit Select|
|odbc.ini file (Unix)||CommitSelect=0|1|
When Commit Select is disabled (the default), the Easysoft ODBC-Firebird Driver automatically commits Insert, Update or Delete statements when in auto-commit mode, but does not commit Select statements. Firebird Select procedures are called from a Select statement and can contain Insert, Update or Delete statements (or call other procedures that contain these statements). Enabling Commit Select forces the Easysoft ODBC-Firebird Driver to call a Commit statement after each call to a Select statement when auto-commit mode is on. This ensures that updates made by Select procedures are committed.
Returns the default column type from the SQLColumns statement.
|DSN Dialog Box (Windows)||With Default|
|odbc.ini file (Unix)||WithDefault=0|1|
|DSN Dialog Box (Windows)||Txn Isolation|
|odbc.ini file (Unix)||TxnMode=0|2|8|
The default isolation method can also be set via the ODBC API, but this attribute provides a way of setting it without altering the calling client application.
|DSN Dialog Box (Windows)||Flush Commit|
|odbc.ini file (Unix)||FlushCommit=0|1|
|DSN Dialog Box (Windows)||Pad Varchar|
|odbc.ini file (Unix)||PadVarchar=0|1|
|DSN Dialog Box (Windows)||Null Schema|
|odbc.ini file (Unix)||NullSchema=0|1|
The ODBC specification states that for ODBC drivers that support schema (owner) information for the tables, but the current database does not have that information, the Schema field in the ODBC metadata fields (SQLTables, SQLColumns, etc.) should contain a empty string. And for those drivers that do not support the use of a schema, a NULL should be returned in those fields.
This option is normally only required with a few application, using the Driver under Microsoft SQL Server as a "Linked Table" is one such application.
|DSN Dialog Box (Windows)||Fix Precision|
|odbc.ini file (Unix)||FixPrecision=0|1|
Because of this, if a application used the above field, the driver will report a precision of 10 and a scale of 3, so the application will expect to only extract fields that conform to this specification. However in some cases, if the value in the database exceeds this precision, the application will report an error.
This option allows the behavior to be altered, such that the ODBC driver reports a precision that is the maximum possible precision that could be stored in the field, overriding the actual stored precision. This prevents applications reporting a error under these conditions.
|DSN Dialog Box (Windows)||Simple UNICODE|
|odbc.ini file (Unix)||SimpleUnicode=0|1|
Under normal conditions, the Firebird Driver uses the operating system provided conversion routine to change the Firebird representation of UNICODE (UTF8) to the ODBC UNICODE standard (UCS-16). However it is possible to store single character values in a Firebird database, that is not a valid UTF8 character sequence. In this case, the operating system routine will not be able to perform the conversion, and will not give the expected result.
This option prevents the driver from using the conversion provided by the Operating System, but instead to use a simple conversion that will allow non UTF-8 data to be correctly converted to UCS-16. This simple conversion cannot correctly convert true UTF8 data, so the use of this option is governed by the actual data stored.
|DSN Dialog Box (Windows)||Default SQLCHAR|
|odbc.ini file (Unix)||WCharDefaultC=0|1|
The ODBC specification allows applications to request that data is returned in a number of forms, and for each SQL datatype there is a DEFAULT type. The specification states, that for a wide character field, the default return type is a SQL_WCHAR, a UNICODE representation.
However, some Microsoft applications do not expect this. It seems that Microsoft Access has been created expecting the default return from a wide character field to be a SQL_CHAR, the ANSI representation.
Microsoft Access only operates in this way, if the field in question is in the primary key of the table, and the symptoms of this are the table opens, but displays #deleted for all the fields.
This option allows the driver to be configured to use the conversion that Microsoft Access expects. It should be remembered that this is enabling non-standard driver behavior, so this may cause problems with other application. If this is the case, create a separate DSN with this option set for use only with Access.
|DSN Dialog Box (Windows)||WCMB Mode|
The Windows version of the Easysoft ODBC-Firebird Driver uses the MultiByteToWideChar and WideCharToMultiByte functions to map character strings to and from wide character strings. Use WCMB Mode to specify the code page to use when doing this conversion. Refer to the Windows documentation for MultiByteToWideChar and WideCharToMultiByte for the meanings of the possible WCMB Mode values.