Borland SQL Link Connection to INFORMIX
Borland SQL Link: Connecting to Informix

To get help on an item, click the underlined text. For an overview of what the SQL Link driver is and how it works, see Essentials first.

	Essentials -- Read this section for a brief overview of Borland SQL Links for Windows.
	Configuring the driver -- Follow these procedures to configure the SQL Link Informix driver.
	Creating an alias -- Information you need to create an Informix alias.
	Connecting to Informix -- How to connect to the Informix database through your IDAPI application.
	Troubleshooting steps -- If you cannot establish an Informix connection, follow these steps to try to isolate the problem.


SQL Link Essentials
Essentials

Borland® SQL Links for Windows is a collection of drivers that let you work with SQL data through supported Borland applications. The SQL Link driver enables the connection to the SQL server, translates queries into the appropriate SQL dialect, and passes them to the SQL database. When processing is complete, the SQL database returns the answer to the client in a format that the desktop application can display.

Note	Borland database applications also support the use of SQL statements against local (Paradox or dBASE) data. For information on how to use local SQL with your Borland database application, see your user documentation.

Supported Borland applications

Borland SQL Links works with any application that supports the Borland Database Engine (also known as IDAPI, the Integrated Database Application Programming Interface).  This includes Paradox for Windows, dBASE for Windows, Quattro Pro for Windows Database Desktop, and custom applications built using the Borland Database Engine.

Supported databases

Drivers in the SQL Links product package support InterBase, Informix, ORACLE, and SYBASE and Microsoft SQL Server databases.


Configuring the SQL Link Driver for INFORMIX
Configuring the SQL Link Informix Driver

Creating an Informix alias

After SQL Link Informix driver installation is complete, the first thing you should do is configure the default parameters for the Informix driver itself.

Driver Name lists all the available drivers.

New Driver enables you to add an ODBC driver connection to the list of available drivers.

Delete Driver enables you to delete an ODBC driver connection from the list of available drivers.

Parameters shows all the parameters with their current values.

Description briefly notes the purpose of the selected parameter.

To configure the Informix driver, choose Informix as the Driver Name and highlight the desired configuration parameters. Delete the old value and enter a new one in the appropriate text box.

Setting	Meaning

VERSION	Internal version number of the SQL Link Informix driver.

TYPE	Type of server to which this driver helps you connect. Can be SERVER (SQL server) or FILE (standard, file-based server).

DLL	The name of the driver's Dynamic Link Library (SQLD_INF.DLL).

DRIVER FLAGS	Internal product-specific flag. Do not change without direct instructions from Borland support personnel.

DATABASE NAME	Name of the target Informix database.

SERVER NAME	Name of the target Informix SQL server.

USER NAME	Default name for accessing the Informix SQL server.

OPEN MODE	Mode in which SQL Link opens the Informix database. Can be READ/WRITE (default) or READ ONLY.

SCHEMA CACHE SIZE	Number of SQL tables whose schema information will be cached. Can be any whole number from 0 to 32 (default=8).

LANGDRIVER	Language driver used to display SQL data. (US. default=blank) Choose the language driver that matches your Informix server character set and collation sequence. If none of the language drivers supplied match, choose a language driver that matches the desired character set. [more]

SQLQRYMODE	Method for handling queries to SQL data. Can be NULL (blank setting; default), SERVER, or LOCAL. [more]

SQLPASSTHRU MODE	Specifies whether or not the desktop application will be able to access the Informix SQL server via desktop queries and pass-through SQL queries in the same alias connection. Can be NOT SHARED, SHARED AUTOCOMMIT (default), or SHARED NO AUTOCOMMIT. [more]

LOCK MODE	Defines how the Informix SQL server handles a process that tries to access a locked row or table. Can be -1, 0, or any whole number from 1 to 32,766. (default=5) [more]

DATE MODE	Format in which the Informix driver sends dates to the server. Must match the Informix server's DBDATE environment variable. Can be either 0 (MDY; default) or 1 (DMY).

DATE SEPARATOR	Character used to separate day, month, and year for DATE MODE information. Must match the Informix server's DBDATE environment variable. Can be forward slash (/; default), period (.), or dash (-).

SCHEMA CACHE TIME	Specifies how long table list information will be cached, in seconds.  Can be -1, 0, or any integer from 1 through 2,147,483,647.  [more]


The Alias Manager dialog box
Creating an Informix Alias

Use the Alias Page to add, delete, or modify an Informix alias.

Alias Name lists all the available aliases.

New Alias enables you to add a new alias.

Delete Alias enables you to delete any alias that is highlighted in the Alias Name box.

Parameters shows all the parameters with their current values.

Description briefly notes the purpose of the selected parameter.

The following parameters are displayed.

Setting	Meaning

TYPE	Type of alias that has been defined. For internal use only.

PATH	Reserved for future use.

DATABASE NAME	Name of the target Informix database.

SERVER NAME	Name of the target Informix SQL server.

USER NAME	Default name for accessing the Informix SQL server.

OPEN MODE	Mode in which SQL Link opens the Informix database. Can be READ/WRITE (default) or READ ONLY.

SCHEMA CACHE SIZE	Number of SQL tables whose schema information will be cached. Can be any whole number from 0 to 32 (default=8).

LANGDRIVER	Language driver used to display SQL data. (US. default=blank) Choose the language driver that matches your Informix server character set and collation sequence. If none of the language drivers supplied match, choose a language driver that matches the desired character set. [more]

SQLQRYMODE	Method for handling queries to SQL data. Can be NULL (blank setting; default), SERVER, or LOCAL. [more]

SQLPASSTHRU MODE	Specifies whether or not the desktop application will be able to access the Informix SQL server via desktop queries and pass-through SQL queries in the same alias connection. Can be NOT SHARED, SHARED AUTOCOMMIT (default), or SHARED NO AUTOCOMMIT. [more]

LOCK MODE	Defines how the Informix SQL server handles a process that tries to access a locked row or table. Can be -1, 0, or any whole number from 1 to 32,766. (default=5) [more]

DATE MODE	Format in which the Informix driver sends dates to the server. Must match the Informix server's DBDATE environment variable. Can be either 0 (MDY; default) or 1 (DMY).

DATE SEPARATOR	Character used to separate day, month, and year for DATE MODE information. Must match the Informix server's DBDATE environment variable. Can be forward slash (/; default), period (.), or dash (-).

SCHEMA CACHE TIME	Specifies how long table list information will be cached, in seconds.  Can be -1, 0, or any integer from 1 through 2,147,483,647.  [more]


Connecting to Informix
Connecting to Informix Through Your IDAPI Application

Troubleshooting your Informix connection

When you are within your IDAPI application you can connect to an Informix database either automatically (by performing a database action) or manually (without performing a database action).

The object of the connection process is to determine whether you have the right to access the database, and, if so, what kind of access permission you have (READ/WRITE or READ ONLY).

The connection is made through your Informix alias.

Connecting from Paradox for Windows or the Database Desktop

The first time you try to query or view a table in your Informix database through Paradox for Windows, SQL Link displays the Database Information dialog box.  To complete the connection, enter your password in the Database Information dialog box and click OK.

If the connection is successful, your application continues with the operation you requested. The database to which you connected remains connected for the rest of the current session.

Connecting manually

If you ever want to connect to a database without first performing a database action, you can connect manually through the Paradox Alias Manager:

1.  Select Files | Aliases to open the Alias Manager dialog box.

2.  Choose the desired alias from the drop-down list in the Database Alias field; the Alias Manager displays the configuration of the selected alias.

3.  Enter your password and choose Connect.  If the connection is successful, the Alias Manager displays Connection is successful.  Database is open.

4.  To close the Alias Manager dialog box, click OK.

Disconnecting manually

To disconnect from the Informix server without exiting Paradox, redisplay the Alias Manager and choose Disconnect.

Connecting from dBASE for Windows

In dBASE for Windows, you cant connect to the Informix database without performing some kind of database action. However, you can start an action against the Informix database in either of the following ways:

From the Navigator

1.	Open the Navigator and click the Tables from Database button; dBASE displays a list of the available database aliases.

2.	Double-click on the desired alias; dBASE displays the Open Database dialog box.

3.	Enter your password in the Open Database dialog box, then click OK.

If the connection is successful, the Navigator displays the tables available through the selected database.

From File | Open

1.	Select File | Open to open the Open File dialog box.

2.	Click the Databases button. dBASE displays the Open Table dialog box, which lists the available database aliases.

3.	Double-click on the alias that connects with the desired database; dBASE displays the Open Database dialog box.

4.	Enter your password in the Open Database dialog box and click OK.

If the connection is successful, the Open Table dialog box displays a list of tables available in the database to which you just connected.


Troubleshooting Steps
Troubleshooting Your Informix Connection

If you have problems connecting to the Informix database from within your IDAPI application:

1.	Make sure the Informix server is on line.

2.	Check whether your workstation network software is running and properly configured.

If you connect to Informix through a TCP/IP network, run PING or its equivalent; if you connect through a Novell network, run SLIST. These programs reflect whether your workstation can "see" the specified server using its network connection.

3.	Check whether you can establish a connection with the Informix server.

Use the Informix isql utility or an equivalent, and try to connect to the Informix server.

If you can connect directly from your workstation but not from within your application, there is probably a problem with your IDAPI.CFG alias setup. Run the IDAPI Configuration Utility and examine your Informix alias.

For information about Informix troubleshooting utilities, see your Informix documentation.


Modifying an Informix Alias

To modify an Informix alias, highlight the alias and the parameter you want to change, then enter a new value in place of the old one.


Adding a New Informix Alias

To create a new Informix alias, click the New Alias button.which displays the Add New Alias dialog box. (The new alias starts with the default alias type: STANDARD.)

Enter a name for the new alias and select the INFORMIX alias type.


Deleting an Informix Alias

To delete an Informix alias, highlight the alias you want to delete, then click the Delete Alias button. Reconfirm by clicking Yes in the Delete Alias dialog box.


LANGDRIVER Settings

Long driver name	Short name	Character set	Collation seq.
Paradox 'ascii'	ascii	DOS code page 437	Binary
Paradox 'intl'	intl	DOS code page 437	Paradox 'intl'
Paradox 'intl' 850	intl850	DOS code page 850	Paradox 'intl' 850
Paradox 'nordan'	nordan	DOS code page 865	Paradox 'nordan'
Paradox 'nordan40'	nordan40	DOS code page 865	Paradox 'nordan40'
Paradox 'swedfin'	swedfin	DOS code page 437	Paradox 'swedfin'
Paradox ANSI INTL	ANSIINTL	ISO8859.1 (ANSI)	Paradox 'intl'
Paradox ESP 437	SPANISH	DOS code page 437	Paradox ESP 437
Paradox ISL 861	iceland	DOS code page 861	Paradox ISL 861
Pdox ANSI INTL850	ANSII850	ISO8859.1 (ANSI)	Pdox 'intl' 850
Pdox ANSI NORDAN40	ANSINOR4	ISO 8859.1 (ANSI)	Pdox 'nordan40'
Pdox ANSI SWEDFIN	ANSISWFIN	ISO 8859.1 (ANSI)	Pdox 'swedfin'
PDox ESP ANSI	ANSISPAN	ISO 8859.1 (ANSI)	PDox ESP437
SQL Link ROMAN8	BLROM800	ROMAN8	Binary
Borland ENU Latin-1	BLLT1US0	ISO 8859.1 (ANSI)	Binary


SQLQRYMODE Settings

Setting	Meaning
NULL (blank setting)	Server-local mode (default). Query goes first to the Informix server. If the server is unable to perform the query, the query is performed at the desktop.
SERVER	Server-only mode. Query is sent to the Informix server. If the server is unable to perform the query, the query fails.
LOCAL	Local-only mode. Query is always performed at the desktop.


SQLPASSTHRU MODE Settings

Setting	Meaning
NOT SHARED  (blank setting)	Pass-through SQL and non-pass-through SQL do NOT share the same connection.
SHARED AUTOCOMMIT	(Default mode) Pass-through SQL and non-pass-through SQL will share the same connection, and (as long as you are not in an explicit client transaction or batch mode) pass-through SQL will be automatically committed.
SHARED NOAUTOCOMMIT	Pass-through SQL and non-pass-through SQL share the same connection, but pass-through statements will not be automatically committed.
For further information, see Connecting to Informix.


LOCK MODE Settings

Setting	Equiv. SQL statement	Meaning
-1	SET LOCK MODE TO WAIT	Suspends the process until the lock is released.
0	SET LOCK MODE TO NOT WAIT	Ends the operation immediately and returns an error code. This is the Informix default, which the Borland SQL Link driver now overrides.
1 - 32,776	SET LOCK MODE TO WAIT n	(Default=5) Suspends the process until the lock is released, or until the end of the specified number of seconds.*.
* In versions of Informix which do not support the seconds option, any non-zero value causes the process to wait until the lock is released


SCHEMA CACHE TIME Settings

Setting	Meaning
-1	(Default). The table list is cached until you close the database.
0	No table lists are cached.
1 through 2147483647	The table list is cached for the number of seconds specified in the setting.