A database interface to an ODBC database. This program is available on Windows systems only.
To access data with fxodbc, you must have installed the necessary ODBC software components (i.e. the Driver Manager, Drivers etc.). These are normally distributed by the vendor responsible for supplying the drivers. Once installed, the ODBC Administrator, located in the Control Panel, may be used to configure one or more databases. If necessary, this process also embeds the means of accessing the database across a network.
An ODBC connect string, typically specified via a command line option, takes the following form:
-c=<dataSourceName>
where <dataSourceName> is the ODBC data source connection string. e.g.
-c="dsn=mydb;uid=myuser;pwd=mypwd"
Components of the connection string may be separated with , or ;
The connection string may or may not be enclosed within quotes depending on
the contents of its components.
Different databases require different components in their connection strings.
This is beyond the scope of this document, but in our example the database is
an Access database on a Windows system.
Typically, a user and password is necessary.
If a key=value component does not contain a key= part, this component is assumed to be the dsn name and dsn= is prepended, e.g.
-c="mydb;uid=myuser;pwd=mypwd"
To hide any sensitive connection information from prying eyes, an encoded string may be used. The utility fxencode is available for such encoding.
fxodbc does not implement PL/SQL facilities.
query_tables <client_string_array>
Returns the names of all tables, excluding system tables, in the database. This list is also selectable by the following command:
iselect * from fxtables
The following table gives the mappings between ODBC datatypes and the Eim data which the translator produces to represent them:
ODBC |
Eim/Fire |
SQL_BIGINT |
numeric |
SQL_BINARY |
blob |
SQL_BIT |
numeric |
SQL_CHAR |
string |
SQL_DATE |
time |
SQL_DECIMAL |
numeric |
SQL_DOUBLE |
numeric |
SQL_FLOAT |
numeric |
SQL_INTEGER |
numeric |
SQL_LONGVARBINARY |
blob |
SQL_LONGVARCHAR |
string |
SQL_NUMERIC |
numeric |
SQL_REAL |
numeric |
SQL_SMALLINT |
numeric |
SQL_TIME |
time |
SQL_TIMESTAMP |
time |
SQL_VARBINARY |
blob |
SQL_VARCHAR |
string |