Copyright

DataDirect Connect ODBC for Informix

© 1999 MERANT Solutions, Inc. All rights reserved.

INTERSOLV, DataDirect, SequeLink, and Middleware are registered trademarks of MERANT Solutions, Inc. DataDirect Connect ODBC, DataDirect Connect OLE DB, DataDirect Reflector, and WebDBLink, are trademarks of MERANT Solutions, Inc. Other company or product names mentioned herein may be trademarks or registered trademarks of their respective companies.


About Connect ODBC for Informix

DataDirect Connect ODBC for Informix (the “Informix driver”) supports multiple connections to the Informix 5x, 6x, and 7x databases in the Windows 9x and Windows NT environments.

DataDirect Connect ODBC for Informix 9 (the “Informix 9 driver”) supports multiple connections to the Informix 7x, and 9x databases in the Windows 9x and Windows NT environments.

The Informix driver file name is IVINFnn.DLL, where nn is the revision level. The Informix 9 driver file name is IVINF9nn.DLL, where nn is the revision level.


System Requirements

Informix

To access remote Informix 5.x, 6.x, or 7.x databases through the Informix driver, you need one of the following:

INFORMIX-Connect for Windows platforms, version 2.x

INFORMIX-Client Software Developer’s Kit for Windows platforms, version 2.x

Note: The DataDirect Informix driver does not work with versions earlier than 7.2 of the previous INFORMIX-Connect product.

Use the SETNET32.EXE utility supplied by Informix to define servers and the location of the INFORMIX directory. Use ILOGIN.EXE to test your connection to the Informix server. The path to the ISQLT07C.DLL must be in your PATH environment variable.

Informix 9

To access remote Informix 7.x or 9 databases through the Informix 9 driver, you need one of the following:

INFORMIX-Connect for Windows platforms, version 2.x

INFORMIX-Client Software Developer’s Kit for Windows platforms, version 2.x

Note: The DataDirect Informix 9 driver does not work with versions earlier than 9.1.3 of the previous INFORMIX-Connect product.

Use the SETNET32.EXE utility supplied by Informix to define servers and the location of the INFORMIX directory. Use ILOGIN.EXE to test your connection to the Informix server. The path to the ISQLT07C.DLL must be in your PATH environment variable.


Configuring Data Sources

To configure an Informix data source, do the following:

1	Start the ODBC Administrator to display a list of data sources.

2	If you are configuring an existing data source, select the data source name and click Configure to display the ODBC Informix Driver Setup dialog box.

If you are configuring a new data source, click Add to display a list of installed drivers. Select Informix and click Finish to display the ODBC Informix Driver Setup dialog box.

3	Specify a data source name and, optionally, a description and database name. Click Apply.

4	Click Test Connect to attempt to connect to the data source using the connection properties specified in the Driver Setup dialog box.

5	Click the Connection tab to configure additional connection information. Settings for Default User Name, Host Name, Service Name, and Server Name will be read automatically from the system information. Click Apply.

6	Click the Advanced tab to configure optional data source settings. Click Apply.

7	Click Translate to display the Select Translator dialog box, which lists the translators specified in the ODBC Translators section of the system information. DataDirect provides a translator named OEM to ANSI that translates your data from the IBM PC character set to the ANSI character set.

Select a translator, then click OK to close this dialog box and perform the translation.

8	Click OK or Cancel. If you click OK, the values you have specified become the defaults when you connect to the data source. You can change these defaults by using this procedure to reconfigure your data source. You can override these defaults by connecting to the data source using a connection string with alternate values.


Test Connection

At any point during the configuration process, you can click Test Connect to attempt to connect to the data source using the connection properties specified in the Driver Setup dialog box. A Logon dialog box is displayed. After providing connection information, click OK.

•	If the driver can connect, it releases the connection and displays a "connection established" message. Click OK.

•	If the driver cannot connect because of an improper environment or incorrect connection value, it will display an appropriate error message.

Verify that the all required client software is properly installed. If it is not, you will see the message:

Specified driver could not be loaded due to system error [xxx].

Click OK.


Connecting to Data Source Using a Logon Dialog
Connecting to a Data Source Using a Logon Dialog

Some ODBC applications display a Logon dialog box dialog box when you are connecting to a data source. In these cases, the data source name has already been specified.

In the Logon dialog box, do the following:

1	Type the name of the database you want to access or select the name from the Database Name drop-down list. This list displays names returned from the Informix server. Or, if you set the Get DB List from Informix option to 0 on the Advanced tab on the ODBC Informix Driver Setup dialog box, this list displays the names you specified.

2	Type the name of the server (host name) on which Informix resides.

3	If required, type your user name as specified on the Informix server.

4	If required, type your password.

5	Optionally, click Options to display the Informix Server Options dialog box, where you can change the Service Name, Server Name, and Protocol Type that you specified in the ODBC Informix Driver Setup dialog box. Click OK to save your changes.

6	Click OK to complete the logon and to update these values in the system information.


Connecting to Data Source Using a Connection String
Connecting to a Data Source Using a Connection String

If your application requires a connection string to connect to a data source, you must specify the data source name that tells the driver which section of the system information to use for the default connection information. Optionally, you may specify attribute=value pairs in the connection string to override the default values stored in the system information. These values are not written to system information.

You can specify either long or short names in the connection string. The connection string has the form:

DSN=data_source_name[;attribute=value[;attribute=value]...]

An example of a connection string for Informix is

DSN=Informix TABLES;DB=PAYROLL

The paragraphs that follow give the long and short names for each attribute, as well as a description. The defaults listed are initial defaults that apply when no value is specified in either the connection string or in the data source definition in the system information. If you specified a value for the attribute when configuring the data source, that value is the default.

ApplicationUsingThreads (AUT): ApplicationUsingThreads={0 | 1}. Ensures that the driver works with multi-threaded applications. The default is 1, which makes the driver thread-safe. When using the driver with single-threaded applications, you may set this option to 0 to avoid additional processing required for ODBC thread safety standards.

CancelDetectInterval (CDI): Allows you to cancel long-running queries in threaded applications. Select a value to determine how often the driver checks whether a request has been canceled using SQLCancel. For example, if CDI=5, then for every pending request, the driver checks every five seconds to see whether the user has canceled execution of the query using SQLCancel. The default is 0, which means that requests will not be canceled until a request has completed execution.

CursorBehavior (CB): CursorBehavior={0 | 1}. Determines whether cursors will be preserved or closed at the end of each transaction. Valid values are 1 (preserve) and 0 (close, the initial default). Set this attribute to 1 if you want cursors to be held at the current position when the transaction ends. The value CursorBehavior=1 may impact the performance of your database operations.

Database (DB): Name of the database to which you want to connect.

DataSourceName (DSN): Identifies an Informix data source configuration in the system information. Examples include "Accounting" or "Informix-Serv1."

EnableInsertCursors (EIC): EnableInsertCursors={0 | 1}. Determines whether the driver can use Insert cursors during inserts governed by parameters. Using Insert cursors improves performance during multiple Insert operations using the same statement. This option enables insert data to be buffered in memory before being written to disk. When EnableInsertCursors=0, the driver does not use Insert cursors. The default is 1.

GetDBListFromInformix (GDBLFI): GetDBListFrom Informix={0 | 1}. Determines whether the driver requests the database list to be returned from the Informix server or from the database list that the user entered at driver setup.

When set to 1, the initial default, the driver requests the database list from the Informix server. When set to 0, it uses the list that was entered by the user at driver setup.

HostName (HOST): Name of the machine on which the Informix server resides.

LogonID (UID): Your user name as specified on the Informix server.

Password (PWD): A password.

Protocol (PRO): Protocol={olsocspx | olsoctcp | onsocspx | onsoctcp | seipcpip | sesocspx | sesoctcp}. Protocol used to communicate with the server. You can specify one or more values; separate the names with commas.

ServerName (SRVR): The name of the server running the Informix database.

Service (SERV): Name of the service as it appears on the host machine. This service is assigned by the system administrator.

TrimBlankFromIndexName (TBFIN): TrimBlankFromIndexName={0 | 1}. Specifies whether or not the leading space should be trimmed from a system-generated index name.  This option is provided to address problems with applications that cannot process a leading space in index names.  When set to 1 (the default), the driver trims the leading space. When set to 0, the driver does not trim the space.

UseDefaultLogin (UDL): UseDefaultLogin={0 | 1}. Specify 1 to read the Logon ID and Password directly from the Informix registry. The default is 0; that is, logon information is read from the system information, the connection string, or the Logon to Informix dialog box.


Data Types

The Informix data types map to the standard ODBC data types as follows:

Informix	ODBC
Byte1	SQL_LONGVARBINARY
Char	SQL_CHAR
Date	SQL_TYPE_DATE
Datetime year to fraction(5)	SQL_TYPE _TIMESTAMP
Datetime year to fraction(f)2	SQL_TYPE_TIMESTAMP
Datetime year to second	SQL_TYPE_TIMESTAMP
Datetime year to day	SQL_TYPE_DATE
Datetime hour to second	SQL_TYPE_TIME
Datetime hour to fraction(f)2	SQL_TYPE_TIME
Decimal	SQL_DECIMAL
Float	SQL_DOUBLE
Integer	SQL_INTEGER
Interval year(p) to year	SQL_INTERVAL_YEAR
Interval year(p) to month	SQL_INTERVAL_YEAR_ TO_MONTH
Interval month(p) to month	SQL_INTERVAL_MONTH
Interval day(p) to day	SQL_INTERVAL_DAY
Interval day(p) to hour	SQL_INTERVAL_DAY_TO_HOUR
Interval day(p) to minute	SQL_INTERVAL_DAY_TO_MINUTE
Interval day(p) to second	SQL_INTERVAL_DAY_TO_SECOND
Interval day(p) to fraction(f)2	SQL_INTERVAL_DAY_TO_SECOND
Interval hour(p) to hour	SQL_INTERVAL_HOUR
Interval hour(p) to minute	SQL_INTERVAL_HOUR_ TO_MINUTE
Interval hour(p) to second	SQL_INTERVAL_HOUR_ TO_SECOND
Interval hour(p) to fraction(f)2	SQL_INTERVAL_HOUR_ TO_SECOND
Interval minute(p) to minute	SQL_INTERVAL_MINUTE
Interval minute(p) to second	SQL_INTERVAL_MINUTE_TO_SECOND
Interval minute(p) to fraction(f)2	SQL_INTERVAL_MINUTE_TO_SECOND
Interval second(p) to second	SQL_INTERVAL_SECOND
Interval second(p) to fraction(f)2	SQL_INTERVAL_SECOND
Interval fraction to fraction(f)2	SQL_VARCHAR
Money	SQL_DECIMAL
Serial	SQL_INTEGER
Smallfloat	SQL_REAL
Smallint	SQL_SMALLINT
Text1	SQL_LONGVARCHAR
Varchar*	SQL_VARCHAR
•	1 Not supported for Standard Engine Databases

•	2 Fraction(f) types are mapped to fraction(5) in the driver. Precision is type dependent and the scale as 5.

•	Note: The Interval data type is not supported. Existing columns of this type are mapped to the ODBC SQL_CHAR data type.

Informix 9

In addition to the other Informix data types, the Informix 9 data types map to the standard ODBC data types as follows:

Informix 9	ODBC
Blob	SQL_LONGVARBINARY
Boolean	SQL_BIT
Clob	SQL_LONGVARCHAR
Int8	SQL_BIGINT
Lvarchar	SQL_VARCHAR
Serial8	SQL_BIGINT
The Informix 9 driver does not support any complex data types (for example, set, multiset, list, and named/unnamed abstract types). When the driver encounters a complex type it will return an Unknown Data Type error (SQL State HY000).


Isolation and Lock Levels Supported

If connected to an Online Server, Informix supports isolation levels 0 (read uncommitted), 1 (read committed), and 3 (serializable). The default is 1. The Standard Engine supports isolation level 0 (read uncommitted) only.

Informix also supports an alternative isolation level 1, called cursor stability. Your ODBC application can use this isolation level by calling SQLSetConnectAttr (1040,1).

Additionally, if transaction logging has not been enabled for your database, transactions are not supported by the driver (the driver is always in auto-commit mode).

Informix supports page-level and row-level locking.


ODBC Conformance Level

The API functions supported are listed in Supported ODBC Functions, found in the General Help section of Connect ODBC Help. In addition, the following functions are supported:

SQLProcedures

SQLColumnPrivileges

SQLTablePrivileges

SQLPrimaryKeys

SQLForeignKeys

SQLProcedureColumns

The driver also supports scrollable cursors with SQLFetchScroll or SQLExtendedFetch. The driver supports the core SQL grammar.


Number of Connections and Statements Supported

The Informix driver supports multiple connections to the Informix database system and multiple statements per connection.


General Tab, ODBC Informix Driver Setup

Use the ODBC Informix Driver Setup dialog box to create new Informix data sources or configure existing data sources.

Data Source Name: A string that identifies this Informix data source configuration in the system information. Examples include "Accounting" or "Informix-Serv1."

Description: An optional long description of a data source name. For example, "My Accounting Database" or "Informix files on Server number 1."

Database Name: The name of the database to which you want to connect by default.

Connection Tab

Displays the Connection tab, where you can configure additional connection information, such as protocol type.

Advanced Tab

Displays the Advanced tab, where you can configure optional data source settings, such as cursor behavior and cancel detect interval.

OK

Cancel

Apply

Test Connect


Connection Tab, ODBC Informix Driver Setup

Use the Connection tab on the ODBC Informix Driver Setup dialog box to specify optional connection settings when you create new Informix data sources or configure existing data sources.

Database List: The list of databases that will be displayed in the Logon dialog box if Get DB List From Informix on the Advanced tab is not checked.

Default User Name: The name of the user as specified on the Informix server.

Use Default Login: Select this check box to read the Logon ID and Password entries directly from the Informix registry. The check box is cleared by default; that is, logon information is read from the system information, the connection string, or the Logon to Informix dialog box.

Host Name: The name of the machine on which the Informix server resides.

Service Name: The name of the service as it appears on the host machine. This service is assigned by the system administrator. The name you specify is displayed in the Informix Server Options dialog box.

Server Name: The name of the Informix server as it appears in the sqlhosts file.

Protocol Type: The protocol used to communicate with the server. Specify one or more values; separate the names with commas. Values can be olsocspx, olsoctcp, onsocspx, onsoctcp, seipcpip, sesocspx, sesoctcp.

OK

Cancel

Apply

Test Connect


Advanced Tab, ODBC Informix Driver Setup

Use the Advanced tab on the ODBC Informix Driver Setup dialog box to specify optional settings when you create new Informix data sources or configure existing data sources.

Cursor Behavior: Select Preserve if you want cursors to be held at the current position when the transaction ends. Otherwise, leave this set to Close. Selecting Preserve may impact the performance of your database operations.

Cancel Detect Interval: Lets you cancel long-running querires in threaded applications. Select a value to determine how often the driver checks whether a request has been canceled using SQLCancel. For example, if CDI=5, then for every pending request, the driver checks every five seconds to see whether the user has canceled execution of the query using SQLCancel. The default is 0, which means that requests will not be canceled until the request has completed execution.

Enable Insert Cursors: Determines whether the driver can use Insert cursors during inserts governed by parameters. Using Insert cursors improves performance during multiple Insert operations using the same statement. This option enables insert data to be buffered in memory before being written to disk. When this check box is cleared (the default), the driver does not use Insert cursors.

Get DB List from Informix: Determines whether the driver requests the database list to be returned from the Informix server or from the database list that the user entered at driver setup.

When the check box is selected, the driver requests the database list from the Informix server. When the check box is cleared, the driver uses the list entered by the user at driver setup.

Application Using Threads: Ensures that the driver works with multi-threaded applications. You can clear this check box when using the driver with single-threaded applications. Clearing this check box avoids the additional processing required for ODBC thread safety standards.

Trim Blank From Index Name: Specifies whether or not the leading space should be trimmed from a system-generated index name.  This option is provided to address problems with applications that cannot process a leading space in index names.  When this box is checked (the default), the driver trims the leading space.

Translate Button

Displays the Select Translator dialog box, where you can translate your data from one character set to another. Choose the OEM to ANSI translator to translate your data from the IBM PC character set to the ANSI character set.

OK

Cancel

Apply

Test Connect


Logon to Informix Dialog

Database Name: Type the name of the database you want to access or select the name from the Database Name drop-down list. The names on the list are determined by the status of the Get DB List From Informix checkbox on the Advanced tab. If the box is checked, the names displayed are returned from the Informix server. If cleared, the names displayed are returned from the user-entered list.

Host Name: Enter the name of the host machine on which the Informix server resides.

User Name: Enter the name of the user as specified on the Informix server.

Password: Enter the user's password.

Options Button

Displays the Informix Server Options  dialog box, where you can specify the Service Name, Server Name, and Protocol type.


Informix Server Options Dialog

Service Name: Name of the service as it appears on the host machine. This service is assigned by the system administrator. If you entered a service name in the Setup dialog box, that name is displayed; you can change it.

Server Name: Name of the Informix server as it appears in the sqlhosts file.

Protocol Type: This list displays the protocols specified in the Setup dialog box. Select a communications protocol.


Apply Button

Writes the settings you have specified to the system information. These settings remain in effect until you change them in this dialog box. Clicking Cancel does not affect settings that have been applied.


OK Button

Writes the settings you have specified to the system information and closes the dialog box.


Cancel Button

Closes the dialog box without saving settings that have not been applied.


Contacting Technical Support

MERANT provides technical support for all registered users of this product, including limited installation support for the first 30 days. If you need support after that time, contact us using one of the methods below or purchase further support by enrolling in the SupportNet program. For more information about SupportNet, contact your sales representative.

World Wide Web
	http://www.merant.com/datadirect/support The MERANT Web site contains up-to-date technical support information under SupportNet. SupportNet Online is our global service network that provides access to valuable tools and information in an online community for users. Our SupportNet Community shares information via the Web, automatic email notification, newsgroups, and regional user groups. SupportNet Online also includes a KnowledgeBase which allows you to search on keywords for technical bulletins and how-to information. You can also download fix releases for your DataDirect products.
Internet
	Australia and New Zealand	australia.answerline@merant.com
	EMEA	int.datadirect.answerline@merant.com
	Japan	jpn.answerline@merant.com.jp
	US and Canada	datadirect.answerline@merant.com
Telephone
Australia	1 800 335 664 or 9816 9977 for Melbourne Metro	8:30-5:30 p.m. Local Melbourne Time (LMT)
Belgium	0800 724 61	9:00-6:30 p.m. CET
France	0800 91 56 07	9:00-6:30 p.m. CET
Germany	0130 822 496 or  +44 1727 812898	9:00-6:30 p.m. CET
Japan	81-3-5401-9660	9:00-12:00, 1:00-5:00 p.m. JST
The Netherlands	0800 022 1609	9:00-6:30 p.m. CET
New Zealand	1 800 335 664	8:30-5:30 p.m. LMT
United Kingdom and Ireland	+44 1727 811881	8:00-5:30 p.m. GMT
USA and Canada	1 800 443 1601	8:30-8:00 p.m. EST
Fax US	1 919 461 4527
Fax Int.	+32-15-320919
Mail	1500 Perimeter Park Drive, Suite 100, Morrisville, NC 27560 USA

Information to Provide

When you contact us, include this information:

•	The product serial number located on the Product Registration Information card or on a product serial number card in the box. The number will be checked to verify your eligibility to receive support. If you do not have a current SupportNet contract, we will ask that you speak with a sales representative.

•	Your name and organization. On a first-time call, you may be asked for full customer information including location and contact details.

•	The version number of the DataDirect product you are using.

•	The type and version of the operating system you are using.

•	Any third party software and other environmental information necessary to understand the problem.

•	A brief description of the problem and the steps necessary to re-create it. Specific error messages are needed. Depending on the complexity of the problem, you may be asked to submit a recreatable example demonstrating the problem.

•	An assessment of the severity level of the reported problem.