Data-source specification
Each DSN in the data sources section has a data-source specification section.
[data_source_name]
Driver=driver_path
Description=data_source_description
Database=database_name
LogonID=user_id
pwd=user_password
Server=database_server
CLIENT_LOCALE=application_locale
DB_LOCALE=database_locale
TRANSLATIONDLL=translation_path
CURSORBEHAVIOR=cursor_behavior
DefaultUDTFetchType=default_UDT_Fetch_type
ENABLESCROLLABLECURSORS=enable_scroll_cursors
ENABLEINSERTCURSORS=enable_insert_cursors
OPTIMIZEAUTOCOMMIT=optimize_auto_commit
NEEDODBCTYPESONLY=need_odbc_types_only
OPTOFC=open_fetch_close_optimization
REPORTKEYSETCURSORS=report_keyset_cursors
FETCHBUFFERSIZE=fetchbuffer_size
DESCRIBEDECIMALFLOATPOINT=describe_decimal_as_float
USESERVERDBLOCALE=use_server_dblocale
DONOTUSELVARCHAR=do_not_use_lvarchar
REPORTCHARCOLASWIDECHARCOL=char_col_as_widechar_col
[ODBC]
UNICODE=unicode_type
LENGTHINCHARFORDIAGRECW=bufferlength_as_number_of_characters
LEAVE_TRAILING_SPACES=leave_trailing_spaces
Keywords | Description | Status |
---|---|---|
data_source_name | Data source specified in the Data Sources section | Required |
Driver | Path for the driver Set this value to the complete path name for the driver library. For more information about the library directory and file names, see the release notes. |
Required |
Description | Description of the DSN Configured for a single user or for system users. |
Optional |
Database | Database to which the DSN connects by default | Required |
LogonID | User identification or account name for access to the DSN | Optional |
pwd | Password for access to the DSN | Optional |
Server | HCL OneDB™ database server on which database_name is in | Required |
CLIENT_LOCALE (GLS only) | Client locale. Default value: en_us.8859-1 | Optional |
DB_LOCALE (GLS only) | Database locale. Default value: en_us.8859-1 | Optional |
TRANSLATIONDLL (GLS only) | DLL that performs code-set conversion; default value: $INFORMIXDIR/lib/esql/ig04a304.xx where xx represents a platform-specific file extension | Optional |
CURSORBEHAVIOR | Flag for cursor behavior when a commit or rollback
transaction is called. Possible values are:
Default value: 0 |
Optional |
DefaultUDTFetchType | Default UDT fetch type. Default value: SQL_C_BINARY Possible
values are:
|
Optional |
ENABLESCROLLABLECURSORS | If this option is activated, the HCL
OneDB ODBC Driver supports
only scrollable, static cursors. Available only as a connection
option: or
as a connection attribute string:
Default value is: 0 (disabled) |
Optional |
ENABLEINSERTCURSORS | Reduces the number of network messages sent to
and from the server by buffering the inserted rows used with arrays
of parameters and insert statements. This option improves the performance
of bulk insert operations. Available as both a connection and statement
option: or
as a connection attribute string:
Default value is: 0 |
Optional |
OPTIMIZEAUTOCOMMIT | Defers automatic commit operations while cursors
remain open. This option can reduce database communication when the
application is using non-ANSI logging databases. Available as a
connection option:
or
as a connection attribute string:
Default value is: 1 (enabled) |
Optional |
OPTOFC | Causes the driver to buffer the open, fetch, and
close cursor messages to the server. This option eliminates one or
more message cycles when you use SQLPrepare, SQLExecute,
and SQLFetch statements to fetch data with a cursor. Only
available as a connection option:
or
as a connection attribute string:
Default is: 0 (disabled) |
Optional |
REPORTKEYSETCURSORS | Causes the driver to report (through SQLGetInfo)
that is supports forward-only, static, and keyset-driver cursors even
though the driver only supports forward-only and static cursors. This
option is used to enable dynaset-type functions, such as Microsoft™ Visual Basic, which require drivers
that support keyset-driven cursors. Also available as connection
option:
or
as a connection attribute string:
Default is: 0 (disabled) |
Optional |
FETCHBUFFERSIZE | Size of a fetch buffer in bytes. Available as
connection attribute string:
The maximum size of the fetch buffer is 2 GB. Default is: 32767 |
Optional |
DESCRIBEDECIMALFLOATPOINT | Describes all floating-point decimal columns as:
A floating-point decimal column is a column that was created without a scale, for example DECIMAL(12). Some prepackaged applications such as Visual Basic cannot properly format Decimal columns that do not have a fixed scale. To use these applications, you must enable this option or redefine the column with a fixed scale. Enabling this option has the disadvantage that SQL_DECIMAL is an exact numeric data type while SQL_REAL and SQL_DOUBLE are approximate numeric data types. SQL_DECIMAL with a precision of 8 or less are described as SQL_REAL. With a precision greater than 8, it is described as SQL_DOUBLE. Available
as connection attribute string:
Default is: 0 (disabled) |
Optional |
USESERVERDBLOCALE | Users server database locale. Available as a
connection attribute string:
Default is: 0 (disabled) |
Optional |
DONOTUSELVARCHAR | If enabled, the SQLGetTypeInfo does
not report LVARCHAR as a supported type (DATA_TYPE) of SQL_VARCHAR.
Some applications use LVARCHAR instead of VARCHAR, even in columns
that are less than 256 bytes. The minimum number of bytes transmitted
for LVARCHAR is higher than VARCHAR. Many LVARCHAR columns can result
in the rowset size exceeding the maximum. Important: Enable
this option only if your SQL_VARCHAR columns are less than 256 bytes. Available
as a connection attribute string:
Default is: 0 (disabled) |
Optional |
REPORTCHARCOLASWIDECHARCOL | Causes SQLDescribeCol to report
character columns as wide character columns as follows:
Available as a connection attribute string:
Default is: 0 (disabled) |
Optional |
UNICODE | Indicates the type of Unicode used by an application.
This attribute applies to UNIX™ applications
only and is set in the ODBC section of the odbc.ini file.
The following considerations apply:
Default is: UTF-8 For more information about using Unicode in an ODBC application, see Unicode. |
Required |
LENGTHINCHARFORDIAGRECW | If enabled, the SQLGetDiagRecW API treats the BufferLength parameter as the number of characters. Default is: FALSE (disabled) For more information about using the BufferLength parameter seeBufferLength in character for SQLGetDiagRecW. |
|
LEAVE_TRAILING_SPACES | If enabled, the driver preserves blank characters
at the end of VARCHAR column results. Possible values are:
|
[EmpInfo]
Driver=/informix/lib/cli/iclis09b.so
Description=Demo data source
Database=odbc_demo
LogonID=admin
pwd=tiger
Server=ifmx_91
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1
TRANSLATIONDLL=/opt/informix/lib/esql/igo4a304.so
[Informix9]
Driver=/work/informix/lib/cli/iclis09b.so
Description=Informix 9.x ODBC Driver
LogonID=user1
pwd=tigress4
Database=odbc_demo
ServerName=my_server
LogonID
or pwd
,
the following error occurs: Insufficient connect information supplied
LogonID
and pwd
if the local HCL
OneDB database
server is on the same computer where the client is located. In this
case, the current user is considered a trusted user. LogonID
and pwd
,
where the server and client are on the same computer, might look like
the following example:Driver=/work/informix/lib/cli/iclis09b.so
Description=Informix 9.x ODBC Driver
LogonID=
pwd=tiger
Database=odbc_demo
ServerName=ifmx_server