Borland SQL Links for Windows
Online User's Guide

Borland SQL Links for Windows enables users to access and manipulate SQL data by using features in Borland applications.

 About Borland SQL Links

 Introduction to Borland SQL Links

 Installing the SQL Link Drivers

 Configuring the SQL Environment

 Connecting to Informix

 Connecting to InterBase

 Connecting to ORACLE

 Connecting to SYBASE and Microsoft SQL Servers


About Borland SQL Links

Supported Borland Applications

Any Borland application that supports the Borland Database Engine (BDE) can use Borland SQL Links. The cornerstone of all Borland Windows-based database products, the Borland Database Engine (BDE) supports Paradox for Windows, dBASE for Windows, Delphi 95, and custom applications built using its API, the Borland Database Engine Software Developer Kit (BDESDK).

For the purpose of this manual, we refer to all supported Borland database products and custom applications as BDE applications.

Supported Databases

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

Where To Find Information

This Online User's Guide describes how Borland SQL Links for Windows works, how to install one or more SQL Link drivers, and how to set up your supported Borland application to access SQL data. Appendices provide driver-specific information on required workstation software, configuration parameters, troubleshooting, and data translation.

This guide is meant to be used with:

your BDE application user documentation, which describes how to use your product to access both local (workstation-based) and SQL server data

your BDE application programming documentation, which describes how to write custom applications to use with both local and SQL server data

your SQL server documentation

the Borland SQL Links README file (READLINK.TXT)

the BDE Online Reference (BDEHLP.HLP)

the BDE Configuration Utility online Help (BDECFG.HLP)

Depending on how you plan to work with SQL data, you might not need to read through all of the above books. The following table shows what kind of information each type of SQL Links user needs, and where to find it in SQL Links and related documentation.


Introduction to Borland SQL Links

This section provides a general overview of the Borland SQL Links and how they work with a Borland Database Engine (BDE) application.

Basically, a local area network (or LAN for short) enables workstation users to share files, software, and printer resources stored on dedicated machines called servers. Workstations connect to network servers through a system of cabling, communications hardware, and software. In large user populations, two or more LANs can connect through gateways to form wide area networks, or WANs.

In a network environment, your workstation uses the network server in much the same way as it uses its own hard disk. If your workstation needs access to data stored on the server's hard disk it requests that data from the server. The server sends the requested data over the network and back to your workstation where it is processed locally. However, the network server differs from the workstation in that server data can be accessed by more than one user at the same time.

For more basic information see:

The Database Server	What a database server does

SQL	What SQL is

How SQL Links Works	What SQL Links does

SQL Links Features	List of SQL capabilities and benefits

Querying SQL Data	Introduction to default and passthrough SQL query modes


The Database Server

A database server is a computer that processes high-level database requests. Although other types of network servers let most processing occur on the user's workstation, database servers are active, with most processing occurring on the database server itself. If your workstation needs access to data stored in a database server, you query the server directly. The database server processes the query itself and sends only the answer over the network and back to your workstation.

Since the processing is performed at the server and not at the workstation that originated the request, the workstation becomes a client of the database server. In a client/server system, multiple clients (users) request the services of the database server through the use of client applications such as Paradox for Windows, dBASE for Windows, Delphi, or Borland C++.

Thus, the client and the server share the work of maintaining the database: the server dictates the kind of interactions the client can have with the data, but the client chooses how to display and use the results of those interactions.


SQL

SQL is a descendant of SEQUEL (or Structured English QUEry Language), which was designed at IBM over twenty years ago. SQL was created as a language for constructing relational database management systems (RDBMS) on any hardware platform. The first commercial RDBMS using SQL appeared in 1981, and SQL is now the standard language for network queries across different hardware and software platforms.

SQL is actually a sublanguage designed to be embedded in an application programming language. It is so flexible that it can be used for both data manipulation and data definition.

SQL database servers handle requests in logical units of work called transactions. A transaction is a group of related operations that must all be performed successfully before the RDBMS will finalize any changes to the database. Transaction processing on database servers ensures that your processing requests are appropriate to the current state of your data.

In SQL, all transactions can be explicitly ended with a statement (command) to either accept or discard the changes. Once you are satisfied that no errors occurred during the transaction, you can end that transaction with a COMMIT statement. The database then changes to reflect the operations you have just performed. If an error occurs, you can abandon the changes with a ROLLBACK statement.

Note:	Many outside sources are available for further information about SQL and RDBMS. An example is C.J. Date's An Introduction to Database Systems (Addison-Wesley, Reading, Massachusetts, 1983).


How SQL Links Works

Borland SQL Links for Windows is designed for BDE application users who need to access both local (Paradox and dBASE) and SQL databases. You begin with the BDE application installed at your workstation, along with any other client software needed to access the SQL server. Once you install the SQL Link driver and create an SQL driver alias, you can use your BDE application to access SQL data the same way you use it to access a local Paradox or dBASE database:

through your application's user interface

through custom applications that may include embedded SQL statements

by passing SQL statements directly to the server

Note:	BDE applications also support the use of SQL statements against local data. For information on how to use local SQL in your BDE application, see your application's user documentation.

With an SQL Link driver installed, you can access SQL data without needing to learn SQL. The 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. This picture shows how it works.

1.	BDE client queries an SQL database.

 2.	SQL Link driver enables connection between the client workstation and the SQL server (translates query into appropriate SQL dialect), and sends the query to the SQL server.

 3.	SQL server performs error and syntax checking on the SQL statements, processes the query, and displays the answer to the BDE client.

 4.	SQL Link driver translates the answer from SQL to client syntax. The client then formats and displays the data to the user.


SQL Links Features

Using your BDE application with an SQL Link driver actually extends what you can do with your application, lending it some of the advantages inherent in using SQL databases:

the ability to query the SQL server directly

support for SQL-style transactions

improved record caching

data locking behavior

Accessing an SQL server through an SQL Link driver and your BDE application also lends traditional SQL database users some of the advantages inherent in workstation databases, enabling you to

move in both directions through a result set or answer table

order data using an available index

set a "book mark" on a database location in the current session, and reuse the bookmark in a later session

work dynamically with the SQL data itself through "live" access to data sources


Querying SQL Data

There are two SQL Link driver options that influence how your application behaves when querying SQL data:

Default SQL Query Mode

Default Passthrough SQL Mode

For information on how to use your application to query SQL data, or how to query Paradox or dBASE data by using SQL statements, see your BDE application documentation. For information on how to adapt custom BDE applications for use with SQL data, see your product-specific online help for SQL and upsizing issues.

Default SQL Query Mode

Under most circumstances, queries to SQL databases are processed on the SQL server. However, in cases where the SQL server cannot (or should not) process a query, the BDE application processes the query locally.

Types of SQL database queries that are processed locally include

Heterogenous queries (queries made across more than one type of data)

Queries that cannot be expressed as a single SQL statement

Queries that the SQL server does not support

If you want to make sure that all queries originating from your BDE application are processed according to the rules of the SQL server, you can configure the SQL Link driver to block workstation processing of queries. For example, you may want to force remote processing if you are using a non-English language driver that does not properly mimic the SQL server's conventions for sorting and uppercasing.

To do so, use the BDE Configuration Utility to modify the default SQL database alias, setting default SQLQRYMODE to SERVER. (See Creating and managing SQL aliases)

Default Passthrough SQL Mode

Usually the BDE application enables you to choose whether you want to query the SQL database through the user interface or pass SQL statements directly to the server. Through the BDE Configuration Utility, you can also specify whether or not SQL statements passed directly to the server should be automatically committed.

For a discussion of SQL passthrough options, see SQLPASSTHRU MODE. For information about using passthrough SQL with your BDE application, see your application's user documentation.


Installing the SQL Link Drivers

This section describes how to install the Borland SQL Link drivers.

Requirements

Installing the Software

Installation Procedure


Requirements

This table lists software that should already be installed and running at the client workstation and database access requirements.  It also lists related files and parameters.

Category	Description

BDE application(s)	Supported BDE application, installed as required by the product documentation

System requirements	1.5 MB of free disk space and operating system that meets the requirements of your BDE application

Access rights	If your BDE application is installed on the shared disk of a network file server, make sure your network user account has Read and Write access rights to the application's BDE installation directory. This directory is modified during SQL Link installation. (For applications installed on the network server only.)

Network protocol software	Network protocol software compatible with both the server network protocol and the client workstation client database communication driver

For information on the software required at your SQL server and other server-related software requirements, see your driver-specific section.

Database Access Requirements

To access the SQL database, you need a valid user identification and password on the SQL server. You also need at least Read (SELECT) access privileges for the SQL database.

To obtain these privileges, see your database administrator.


Installing the Software

Before you begin:  Be sure your workstation already meets the client workstation requirements for installing Borland SQL Links for Windows.  See Requirements

Be sure you have already installed your BDE application.

What Happens During Installation?

During installation, the SQL Links installation program always:

Installs an SQL Link driver that enables your application to access your SQL database.

Adds new options to the BDE Configuration Utility so you can configure the driver default parameters and create an alias to an SQL database.

Installs an online Help file you can use when configuring the driver.

Installs READLINK.TXT, a text file containing late-breaking information.

Depending on which driver(s) you install, the installation program may install other driver support files or ask you for other information about the SQL server to which you plan to connect. For further information see the "Installation Changes" section of your driver-specific section.

When you are ready to install, see Installation Procedure


Installation Procedure

To run the Borland SQL Links INSTALL program:

1	Insert SQL Links Disk 1 in the client workstation external disk drive. This is usually drive A or drive B.

2	If Windows is not already running, but is in the workstation DOS PATH, enter
A:INSTALL (or B:INSTALL) at the workstation DOS prompt. INSTALL loads Windows and displays the opening dialog box.

If Windows is already running:

 1	Choose File|Run from the Program Manager menu bar. The Program Manager displays the Run dialog box.

 2	Enter A:INSTALL (or B:INSTALL) in the Command Line text box. INSTALL displays the opening dialog box

3	Select Next or press Enter. INSTALL checks whether the BDE's dynamic link library (IDAPI01.DLL) is present on the workstation disk. If necessary, it displays a dialog box where you can specify the location of this file.

When the location of IDAPI01.DLL is established, INSTALL displays the Borland SQL Links for Windows Directory dialog box. Specify which SQL Link drivers you want to install.

When you are finished, select Next or press Enter. INSTALL displays the IDAPI Location Settings dialog box.

4	Specify the location where you want INSTALL to copy an updated version of your BDE configuration file (IDAPI.CFG).

When you are finished, select Next or press Enter.

Depending on which driver you selected, the Installation program may request further information before it proceeds. Your driver-specific section describes this information.

5	Once you supply all the necessary information, installation begins.

When installation is complete, you may wish to read the SQL Links README file, READLINK.TXT, to find out about late-breaking information.


Configuring the SQL Environment

Installed with your BDE application is the BDE Configuration Utility (BDECFG.EXE), which enables users to modify their application configuration. The configuration parameters are stored in a binary file named IDAPI.CFG that the application reads at startup. Both files are usually located in the directory specified for BDE files during application installation (normally C:\IDAPI).

This section describes how to use the BDE Configuration Utility to set up your application's SQL environment. Once your BDE application is configured, you are ready to connect to the network and access the SQL server, as described at the end of this chapter.

For general instructions on how to use the BDE Configuration Utility, see your BDE application User's Guide or open the BDE Configuration Utility and select the Help button to display online Help.

Before You Begin

Specifying Default SQL Link Driver Settings

Creating and Managing SQL Aliases

Connecting to the SQL Server


Before You Begin

Be sure you have already installed the SQL Links software.

1.	Exit all other Borland applications.

2.	Open your application program group in the Windows Program Manager.

3.	Select the BDE Configuration Utility icon. The Configuration Utility window appears, open to the Driver Manager page.


Specifying Default SQL Link Driver Settings

An alias is a name and a set of parameters that describe a network resource. BDE applications use aliases to connect with shared databases. An alias is not required to access a local database, but it is required to access an SQL database.

The SQL Link settings for your driver serve as a prototype for each new alias you create. Although you can customize an alias after you create it, it is easier to specify default driver settings that match your installation before you create any aliases for SQL databases. Then every alias you create will inherit these settings.

To specify default driver settings,

1	Highlight the entry for your driver. The Driver Manager displays all the configuration parameters for that driver.

Use the scroll bars at the side of the Parameters list to examine the driver configuration parameters.

2	If desired, edit the driver's default configuration. If you leave any categories blank, the Configuration Utility assumes you want to use the driver default.

3	When you are finished, select File | Save.

Your changes take effect the next time you start your application.

The following configuration parameters are common to all SQL Link drivers:

DLL

DRIVER FLAGS

LANGDRIVER

OPEN MODE

SCHEMA CACHE SIZE

SCHEMA CACHE TIME

SERVER NAME

SQLPASSTHRU MODE

SQLQRYMODE

TYPE

USER NAME

VERSION

For information on settings that are unique to a particular SQL Link driver, see the driver-specific sections:

Connecting to Informix

Connecting to InterBase

Connecting to Oracle

Connecting to SYBASE and Microsoft SQL Servers

Alternatively, in the BDE Configuration Utility, you can highlight the driver name and select Help.


DLL

SQL Link dynamic link library name for the selected driver.


DRIVER FLAGS

Internal product-specific flag.


LANGDRIVER

Language driver used to manipulate all data that originates from the SQL server. When the cursor is in the LANGDRIVER field, a scroll bar appears at the right side of the text box; use the scroll bar to display a list of language driver long names that work with your driver. In the United States, the default value is blank.

When a specific language driver is associated with a server alias, your application uses this driver to manipulate all data that originates from the server. This includes all tables you view and all answer tables that result from a query. Servers running on different systems use conventions called character sets (or code pages) to determine how to encode alphabetic data. If you operate in a non-English language environment, your BDE application may use a different character set than the one used by the SQL server. When the character set at your desktop does not match the character set at the SQL server, passing alphabetic data between the two may cause either (or both) of the following:

Data displays incorrectly on your desktop.

The wrong characters are recorded in the SQL database.

To prevent this from happening, the SQL Links provide language drivers to convert character data between your application character set and the SQL server character set. This ensures that the characters from your server display correctly on your desktop, and that data you enter in the SQL server database is transmitted reliably.

If your SQL database uses extended character sets, make sure the alias you use to access the SQL server specifies the correct SQL Link language driver. Choose a language driver that uses the same character set in which the server passes data to your BDE application, and a collation sequence that matches your server's collation sequence. If you cannot find an appropriate SQL Link language driver, you may want to modify your alias SQLQRYMODE entry to prevent processing of queries under local database rules.


OPEN MODE

Mode in which SQL Links opens the SQL database. Possible values are READ/WRITE and READ ONLY. The default value is READ/WRITE.

Note:	Setting OPEN MODE to READ ONLY affects operations from the user interface, but has no effect on passthrough SQL.


SCHEMA CACHE SIZE

Number of SQL tables whose schema information will be cached. Possible values are
0  32. The default value is 8.


SCHEMA CACHE TIME

Specifies how long table list information will be cached. (In BDE table information is cached when you call either DbiOpenTableList or DbiOpenFileList.) Possible modes and their meanings are listed here.  The default value is -1.

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.

Setting this value can increase performance for table and file list retrieval.


SERVER NAME

Name of the target SQL server. When specified for InterBase servers, includes the full path to the database file, that is, servername:/usr/gds/directoryname/databasename.gdb.


SQLPASSTHRU MODE

Specifies whether or not the Borland application will be able to access the SQL server via both desktop commands and passthrough SQL in the same alias connection. Possible modes and their meanings are listed in this table. The default value is SHARED AUTOCOMMIT for Informix; NOT SHARED for all other SQL Link drivers.

Setting	Meaning

NOT SHARED	(blank setting) Passthrough SQL and non-passthrough SQL do NOT share the same connection.

SHARED AUTOCOMMIT	Default. Passthrough SQL and non-passthrough SQL will share the same connection, and passthrough SQL will behave in a similar fashion to non-passthrough. This means that, as long as the user is not in an explicit client transaction or batch mode, passthrough SQL statements will be automatically committed.

SHARED NOAUTOCOMMIT	Passthrough SQL and non-passthrough SQL will share the same connection, but the SQL driver will not automatically commit passthrough statements. In this mode, passthrough behavior is server-dependent.

SHARED AUTOCOMMIT and SHARED NOAUTOCOMMIT modes do not support all passthrough SQL statements.When SHARED AUTOCOMMIT or SHARED NOAUTOCOMMIT mode is set, do not execute transaction control statements in passthrough SQL; use your BDE application programming language to begin, commit, or roll back the transaction.

When passthrough SQL and non-passthrough queries share a single connection, the record cache does not immediately reflect updates performed in passthrough SQL.

For a discussion of how the application processes passthrough SQL queries, and information about using pass-though SQL with your Borland application, see your application product documentation.


SQLQRYMODE

Method for handling queries to SQL data. Possible modes and their meanings are listed here. The default value is NULL (blank setting).

Setting	Mode	Meaning

NULL	(blank setting)	Server-local(Default mode) In server-local query mode, the query goes first to the SQL server. If the server is unable to perform the query, the query is performed locally.  For a discussion of how Borland language drivers affect the processing of SQL queries, see "Blocking local processing of queries," below.

SERVER	Server-only	In server-only query mode, the query is sent to the SQL server. If the server is unable to perform the query, no local processing is performed.

LOCAL	Local-only	In local-only query mode, the query is always performed locally.

How language drivers affect SQL server query processing

Language drivers include information on sort order and uppercasing conventions used by your SQL server. Whenever a query to an SQL database is processed under the rules of the local (non-SQL) database, the application language driver is used in evaluating character ranges for sorting. If the sort order and uppercasing conventions at your desktop do not match the conventions used at the SQL server, your application may display inconsistent results. (A different sort order can cause the selection of a different set of records.)

To ensure consistent results you may want to set SQLQRYMODE to block local processing of queries, as described in the following section.

Blocking local processing of queries

Normally queries to SQL databases are processed on the SQL server. However, in some cases, the result of a query executed completely on an SQL server will differ from that of a query executed locally. For example, say you use your BDE application's query function to perform a case-sensitive search on character fields. If the server does not support case-sensitive searches on a character field, then selecting on criteria such as ">A" will produce a different answer set depending on where the query is processed.

If you want to make sure that all queries originating from the BDE application are processed according to the rules of the SQL server, you can configure the SQL Link driver to block local processing of queries.

To do so, use the BDE Configuration Utility to modify the SQL database alias, setting SQLQRYMODE to SERVER. (See Modifying an Existing SQL Alias.)

The new SQLQRYMODE value takes effect the next time you start your application.

Note:	Types of SQL database queries that are always processed locally will return an error message when SQLQRYMODE is set to SERVER. These include:

Heterogenous queries (queries made across more than one type of data)

Queries that cannot be expressed as a single SQL statement

Queries that the SQL server does not support


TYPE

Current driver type. SERVER notes that the driver is for connecting to an SQL server; FILE notes that the driver is for connecting to a standard, file-based server.


USER NAME

Default user name for accessing the SQL server.


VERSION

Internal Borland version number of the SQL Link driver.


Creating and Managing SQL Aliases

Setting up a standard alias consists of assigning a name to, and specifying the path name for, a directory containing Paradox or dBASE files.

Setting up an alias for an SQL database consists of assigning a name to, and customizing the access parameters for, an SQL server and database.

Your SQL alias includes your user name and password on the target SQL server, and is required to access any SQL data through your BDE product. A generic SQL alias is automatically created the first time you modify the default SQL Link driver parameters after installation.

The following topics describe how to use the Configuration Utility to add, modify, and delete aliases.

Adding a New SQL Alias

Modifying an Existing SQL Alias

Deleting an SQL Alias

Connecting to the SQL Server


Adding a New SQL Alias

To add a new alias,

1	Select the Alias Manager (Aliases page) and choose the New Alias button. The Add New Alias dialog box appears.

2	Enter the new alias name and select the SQL-specific alias type. Then choose OK to begin the setup process. The Alias Manager displays all the configuration parameters you can change to customize the new alias.

The parameters are the same as those listed in the Driver Manager for your driver type. For a description of each setting you can change, see Specifying Default SQL Link Driver Settings

3	If desired, edit the settings for the category you selected. If you leave any categories blank, the Alias Manager assumes you want to use the default for driver type.

4	When you are finished, select File | Save to save the new alias in the default configuration file; select File | Save as to save the new alias in a configuration file with a different name.

Note:	If you save the new alias in a configuration file with a different name, the BDE Configuration Utility displays a Save As dialog box.

Choose Yes if you want to activate this configuration file next time you start your application. Choose No if you want to keep using the current default configuration file.

Your changes take effect the next time you start your application.


Modifying an Existing SQL Alias

This subsection describes how to modify the parameters in an existing SQL server alias. To change a default parameter type for all aliases of that driver type, follow the procedure described earlier in Specifying Default SQL Link Driver Settings.  When you modify a driver parameter, all aliases that use the default setting for that parameter inherit the new setting.

To modify an existing alias,

1	Scan the list of Alias Names available through the current configuration file. If the alias you want to modify was stored in a different configuration file, use File | Open to load that configuration file.

2	Highlight the name of the alias you wish to modify. The configuration for that alias appears in the Parameters section of the Alias Manager page. The parameters are the same as those listed in the Driver Manager.

3	Highlight the configuration parameter you wish to change, and enter the desired value. If you leave any categories blank, the Alias Manager assumes you want to use the driver's default value.

4	When you are finished, select File|Save to save the new alias in the default configuration file; select File|Save As to save the new alias in a configuration file with a different name.

Your changes take effect the next time you start your application.


Deleting an SQL Alias

To delete an alias,

1	Scan the list of Alias Names available through the current configuration file. If the alias you want to delete was stored in a different configuration file, use File|Open to load that configuration file.

2	Highlight the name of the alias you wish to modify, and select the Delete Alias button.

3	Select File|Save to save your changes in the default configuration file; select File|Save As to save your changes in a different configuration file.


Connecting to the SQL Server

Whenever you attempt an operation against an SQL database for the first time in a session (like opening a table or running a query), you trigger an automatic connection process. The object of this process is to ensure that you have the right to access the database.

If your BDE files and your SQL Link driver are configured properly, you should be able to use your application's File menu to select a table in your SQL database through the appropriate alias. See Creating and Managing SQL Aliases

If you have trouble connecting, see the troubleshooting procedures in your driver-specific section and your BDE application documentation.

Note:	If you saved your new (or modified) alias in a configuration file with a different name, be sure to activate that configuration file in your Windows WIN.INI file before you start your BDE application. One way to do this is to update the IDAPI section of WIN.INI directly, changing the CONFIGFILE01= statement to reflect the desired configuration file. Another way to do this is to open and save the file through the BDE Configuration Utility. If directed at Save time, the BDE Configuration Utility automatically updates your WIN.INI file.


Connecting to Informix

This section describes how to troubleshoot common Borland Informix SQL Link connection problems, and discusses various topics about using Borland SQL Links that are unique to Informix.

INFORMIX-SQL Server Requirements

Informix Client Workstation Requirements

Informix Database Access Requirements

Informix Installation Changes

Special SQL Link Driver Settings for Informix

Borland Language Drivers For Informix

Troubleshooting Informix Connection Problems

Working with Informix Servers


INFORMIX-SQL Server Requirements

Here is a list of software that should already be installed and running at the INFORMIX-SQL server before you install the Borland Informix SQL Link driver

Category	Description

Database server software	Informix V. 4.10 or Informix ESQL/C 5.01

Network protocol software	TCP/IP or SPX network protocol software compatible with both the database server and the client workstation network protocol.


Informix Client Workstation Requirements

Here is a list of software that should already be installed and running at the client workstation, including related files and parameters.

Category	Description

BDE application(s)	Supported BDE application, installed as required by the product documentation.

Informix PC client software	INFORMIX-NET/ PC 4.1 or 5.01

Requirements	1.5 MB of free disk spaceHardware and operating system that meets the requirements of your Borland desktop product.

Access rights	(For desktop products installed on the network server only.)
If your Borland desktop product is installed on a network file server, make sure your network user account has Read and Write access rights to the product's BDE files, including the BDE Configuration Utility (BDECFG.EXE) and the BDE configuration file (IDAPI.CFG). This directory is modified during SQL Links installation.

Network protocol software	TCP or SPX network protocol software compatible with both the server network protocol and the client workstation communication driver.


Informix Database Access Requirements

Accessing the INFORMIX-SQL database requires a valid user identification and password on the Informix server, and at least Read (SELECT) access privileges. If you are a Netware user, you should also belong to the Network group "Informix" on the server where the Informix database resides.

To obtain these privileges, see your database administrator.


Informix Installation Changes
K+Informix Installation Changes

When you install the Borland Informix SQL Link driver, the following changes take place in your workstation system:

Item added	Description

SQLD_INF.DLL	Dynamic Link Library comprising the INFORMIX SQL Link driver and its supporting files for Informix V. 4.10

SQLD_IN5.DLL	Dynamic Link Library comprising the INFORMIX SQL Link driver and its supporting files for Informix ESQL/C 5.01

INFORMIX driver type	Added to Configuration Utility Driver Manager to enable basic configuration of Borland INFORMIX SQL Link driver.

INFORMIX alias type	Added to Configuration Utility Alias Manager to enable creation of an alias that can connect to an SQL Server database.

SQLD_INF.HLP	Help file for configuring INFORMIX driver.

READLINK.TXT	Borland SQL Links for Windows README file.

*.IEM files	Informix message files; any that do not already exist in C:\INFORMIX are added during SQL Links installation.

LDLLSQLW.DLL	Informix SQL library.

BLROM800.LD	SQL Link ROMAN8 language driver using binary collation sequence.


Special SQL Link Driver Settings for Informix

These Configuration Utility parameters are unique to Informix:

DATABASE NAME

DATE MODE

DATE SEPARATOR

LOCK MODE


DATABASE NAME

Name of the target SQL database.


DATE MODE

The format in which the driver sends dates to the SQL server. Valid settings are 0 (MDY) and 1 (DMY).

Note:	This setting must match the DBDATE environment variable on the Informix server.


DATE SEPARATOR

The character used to separate day, month, and year for DATE MODE information. Valid characters are the forward slash (/), the period (.), and the dash (-).

The default character is the forward slash.

Note:	This setting must match the DBDATE environment variable on the Informix server.


LOCK MODE

Defines how the server handles a process that tries to access a locked row or table. This table lists possible values and their meanings. The default value is 5 (blank setting).

Setting	SQL Statement Represented	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 Informix driver now overrides.

1-32766	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.

Note:	Lock mode has no effect on exclusive locks. If a process attempts to access a row, table, or database that is locked in exclusive mode, the operation ends and an error code is returned.


Borland Language Drivers For Informix

The following table lists language drivers available for use with Informix, their corresponding character sets, and Borland collation sequences. Choose the language driver that uses the same collation sequence as your server, and the same character set as the one your server uses to pass data to your BDE application.

Long driver name	Short driver name	Character set	Collation sequence

Borland ENU Latin-1	BLLT1US0 	ISO8859.1(ANSI)	Binary

dBASE FRA cp437	DB437FR0	DOS CODE PAGE 437	dBASE French

dBASE FIN cp437	DB437FI0	DOS CODE PAGE 437	dBASE Finnish

dBASE ENU cp437	DB437US0	DOS CODE PAGE 437	dBASE English/US

dBASE NOR cp865	DB865NO0	DOS CODE PAGE 865	dBASE Norwegian

dBASE SVE cp437	DB437SV0	DOS CODE PAGE 437	dBASE Swedish

dBASE SVE cp850	DB850SV1	DOS CODE PAGE 850	dBASE Swedish850

dBASE ESP cp437	DB437ES1	DOS CODE PAGE 437	dBASE Spanish

dBASE NLD cp437	DB437NL0	DOS CODE PAGE 437	dBASE Dutch

dBASE ESP cp850	DB850ES1	DOS CODE PAGE 850	dBASE Spanish850

dBASE ENG cp437	DB437UK0	DOS CODE PAGE 437	dBASE English/UK

dBASE ENU cp850	DB850US0	DOS CODE PAGE 850	dBASE English/US

dBASE FRC cp863	DB863CF1	DOS CODE PAGE 863	dBASE French Canadian

dBASE ENG cp850	DB850UK0	DOS CODE PAGE 850	dBASE English850/UK

dBASE ITA cp850	DB850IT1	DOS CODE PAGE 850	dBASE Italian850

dBASE DEU cp850	BD850DE0	DOS CODE PAGE 850	dBASE German850

dBASE FRA cp850	DB850FR0	DOS CODE PAGE 850	dBASE French850

dBASE ITA cp437	DB437IT0	DOS CODE PAGE 437	dBASE Italian

dBASE NLD cp850	DB850NL0	DOS CODE PAGE 850	dBASE Dutch

dBASE FRC cp850	DB850CF0	DOS CODE PAGE 850	dBASE French Canadian850

dBASE DAN cp865	DB865DA0	DOS CODE PAGE 865	dBASE Danish

dBASE DEU cp437	DB437DE0	DOS CODE PAGE 437	dBASE German

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)	Paradox 'intl' 850

Pdox ANSI NORDAN4	ANSINOR4	ISO8859.1 (ANSI)	Paradox 'nordan40'

Pdox ANSI SWEDFIN	ANSISWFN	ISO8859.1 (ANSI)	Paradox 'swedfin'

Pdox ESP ANSI	ANSISPAN	ISO8859.1 (ANSI)	Paradox ESP437

SQL Link ROMAN8	BLROM800	ROMAN8	Binary


Troubleshooting Informix Connection Problems

If you have problems connecting to the Informix database from within your BDE application,

1	Confirm that the Informix server is on line.

If not--Consult your Informix database administrator.

If so--Continue with step 2.

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.

If the Informix server does not appear--Consult your network administrator.

If the Informix server appears--Continue with step 3.

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 isql does not work--Consult your Informix database administrator.

If isql works--Continue with step 4.

4	Check whether your BDE application's Informix alias is set up properly.

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

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


Working with Informix Servers

This section provides information about Informix servers and their implementation of SQL. The topics discussed in this section cover aspects of Informix that differ from other SQL database products.

Note:	To improve query retrieval time, you may want to use the Informix UPDATE STATISTICS statement.

Informix Data Type Translations

Transaction Isolation Levels

Informix Field-naming Rules

This table lists the general items that you might find helpful in working with Informix.

Item	Description

Dynamic Link Library (DLL) name	SQLD_INF.DLL for Informix ESQL/C 4.1
SQLD_IN5.DLL FOR Informix ESQL/C 5.01

Case-sensitive for data?	Yes (including pattern matching)

Case-sensitive for objects

(such as tables, columns, indexes)?	No (ANSI-compliant databases are case-sensitive on owner name only)

Does the server require an explicit
request to begin a transaction for
multi-statement transaction processing?	Yes (if your database isset up for transactions

Does the server require that you
explicitly start a transaction for
multi-statement transaction processing
in passthrough SQL?	Depends on how the Informix database was set up:

    ANSI-compliant--NO
    Logging database--YES
    Non-logging database--NOT APPLICABLE

Implicit row IDs	Yes

Blob handles	No

Maximum size of single blob read	64K

Multiple client connections?	Yes

Run-time specification of server
information, such as Server Name,
User Name, and Password?	Yes

Stored procedures?	Yes.  See BDE Online Reference


Informix Data Type Translations

Certain database operations cause SQL Link to convert data from Paradox or dBASE format to Informix format. For example, a BDE application that copies or appends data from a local table to an Informix table causes SQL Links to convert the local data to Informix format before performing the copy or append operation.

Other database operations cause a conversion in the opposite direction, from Informix format to Paradox or dBASE format. For example, suppose you run a local query against one or more SQL tables. During the query, SQL Link converts any data originating in an SQL database to Paradox or dBASE format (depending on the answer format requested) before placing the data in the local answer table.

The following topics contain tables showing Informix, Paradox, and dBASE data types and show how SQL Link translates between them in append, copy, and local query operations:

From Informix Data Types

From Paradox Data Types

From dBASE Data Types

From Paradox Physical Types

From dBASE Physical Types

From Informix Physical Types

Using the Informix Interval Data Type


From Informix Data Types

From Informix	To Paradox	To dBASE

Char <255	Alpha	Character

Char >255	Memo	Memo

Smallint	Short	Number {6.0}

Integer	Number	Number {11.0}

Smallfloat	Number	Float {20.4}

Float	Number	Float {20.4}

Money	Money	Float

Decimal	Number	Float

Date	Date	Date

DateTime	DateTime	Date

Interval	Alpha {25}	Character

Serial	Number	Number {11.0}

Byte	Binary	Memo

Text	Memo	Memo

Varchar	Alpha	Character


From Paradox Data Types

From Paradox	To dBASE	To Informix

Alpha	Character	Char

Number	Float {20.4}	Float

Money	Float {20.4}	Money {16.2}

Date	Date	Date

Short	Number {6.0}	Smallint

Memo	Memo	Text

Binary	Memo	Byte

Formatted Memo	Memo	Byte

OLE	Memo	Byte

Graphic	Memo	Byte

Long	Number {11.0}	Integer

Time	Character {>8}	Character {>8}

DateTime	Character {>8}	DateTime

Bool	Bool	Character

AutoInc	Number {11.0}	Integer

Bytes	Bytes	Byte

BCD	N/A	N/A


From dBASE Data Types

From dBASE	To Paradox	To Informix

Character	Alpha	Char

Number	Short, Number	Smallint, Float

Float	Number	Float

Date	Date	Date

Memo	Memo	Text

Bool	Bool	Char

Bytes	Bytes	Byte

Lock	Alpha {24}	Char

Note:	The dBASE Number data type translates to different Informix and Paradox data types depending on the WIDTH and DEC specification.  A dBASE Number with a WIDTH less than 5 and a DEC equal to 0 translates to the Informix Smallint data type or the Paradox Short data type.  dBASE Numbers with a WIDTH greater than 5 or a DEC greater than 0 translate into the Informix Float data type or the Paradox Number data type.


From Paradox Physical Types

Paradox physical	BDE logical	dBASE physical

fldPDXCHAR	fldZSTRING	fldDBCHAR

fldPDXNUM	fldFLOAT	fldDBFLOAT {20.4}

fldPDXMONEY	fldFLOAT/fldstMONEY	fldDBFLOAT {20.4}

fldPDXDATE	fldDATE	fldDATE

fldPDXSHORT	fldINT16	fldDBNUM {6.0}

fldPDXMEMO	fldBLOB/fldstMEMO	fldDBMEMO

fldPDXBINARYBLOB	fldBLOB/fldstBINARY	fldDBMEMO

fldPDXFMTMEMO	fldBLOB/fldstFMTMEMO	fldDBMEMO

fldPDXOLEBLOB	fldBLOB/fldstOLEOBJ	fldDBMEMO

fldPDXGRAPHIC	fldBLOB/fldstGRAPHIC	fldDBMEMO

fldPDXBLOB	fldPDXMEMO	fldDBMEMO

fldPDXLONG	fldINT32	fldDBNUM {11.0}

fldPDXTIME	fldTIME	fldDBCHAR {>8}

fldPDXDATETIME	fldTIMESTAMP	fldDBCHAR {30}

fldPDXBOOL	fldBOOL	fldDBBOOL

fldPDXAUTOINC	fldINT32	fldDBNUM {11.0}

fldPDXBYTES	fldBYTES	fldDBBYTES

fldPDXBCD	fldBCD	fldDBCHAR


From dBASE Physical Types

dBASE physical	BDE logical	Paradox physical

fldDBCHAR	fldZSTRING	fldPDXCHAR

fldDBNUM	if( iUnits2=0 && iUnits1<5 )	fldINT16 else fldFLOAT fldPDXSHORTfldPDXNUM

fldDBMEMO	fldBLOB	fldPDXMEMO

fldDBBOOL	fldBOOL	fldPDXBOOL

fldDBDATE	fldDATE	fldPDXDATE

fldDBFLOAT	fldFLOAT	fldPDXNUM

fldDBLOCK	fldLOCKINFO	N/A

fldDBBINARY	fldBLOB/fldstTYPEDBINARY	fldPDXBINARYBLOB

fldDBOLEBLOB	fldBLOB/fldstDBSOLEOBJ	fldPDXOLEBLOB


From Informix Physical Types

Informix physical	BDE logical	Paradox physical	dBASE physical

fldINFCHAR < 255	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldINFCHAR > 255	fldBLOB	fldstMEMO	fldDBMEMO

fldINFSMALLINT	fldINT16	fldPDXSHORT	fldDBNUM {6.0}

fldINFINTEGER	fldINT32	fldPDXLONG	fldDBNUM {11.0}

fldINFSMALLFLOAT	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldINFFLOAT	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldINFMONEY	fldFLOAT/fldstMONEY	fldPDXMONEY	fldDBFLOAT {20.4}

fldINFDECIMAL	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldINFDATE	fldDATE	fldPDXDATE	fldDBDATE

fldINFDATETIME	fldTIMESTAMP	fldPDXDATETIME	fldDBDATE

fldINFINTERVAL	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldINFSERIAL	fldINT32	fldPDXLONG	fldDBNUM {11.0}

fldINFBYTE	fldBLOB/fldstBINARY	fldPDXBINARYBLOB	fldDBMEMO

fldINFTEXT	fldBLOB/fldstMEMO	fldPDXMEMO	fldDBMEMO

fldINFVARCHAR	fldZSTRING	fldPDXCHAR	fldDBCHAR


Using the Informix Interval Data Type

BDE applications have no data type that is directly equivalent to the Informix Interval data type.

Developers can create Interval fields with the Year-to-month qualifier on Informix servers.  However, when you manipulate Informix Interval data with any range qualifiers through your BDE application, the SQL Link driver translates it into a character string.

For more information on the Informix Interval data type, see the Informix Guide to SQL: Reference.


Transaction Isolation Levels

Informix supports four levels of isolation among processes attempting to access data.  A database's default isolation level is established according to database type, at the time the database is created:

Dirty read
Default isolation level for non-logging databases. Provides no isolation.

Committed read
Default isolation level for logging/non-ANSI databases. Guarantees that every retrieved row is committed in the table at the time that the row is retrieved, but does not prevent other processes from acquiring an exclusive lock on that same row. This makes it possible for another process to acquire an exclusive lock on that row, and modify or delete it, before you commit your transaction.

Cursor stability
Not applicable to BDE applications.

Repeatable read
Default isolation level for ANSI-compliant databases. Acquires a shared lock on every row selected during the transaction. This does not prevent another process from acquiring a shared lock on a selected row, but it does prevent another process from modifying any selected row during your transaction.

In some cases, when connecting with your Informix database, your BDE application overrides the current Informix transaction isolation settings.  The following table shows under which circumstances these overrides occur.

Database	Default isolation level:	Default isolation level:
Informix	SQL Link

ANSI	RepeatableRead	CommittedRead

Logged	CommittedRead	CommittedRead

Non-logged	DirtyRead	DirtyRead


Informix Field-naming Rules

This table lists field-naming rules for Paradox, dBASE, and Informix.

Naming rule	Paradox	dBASE	Informix

Max length (characters)	25	10	18

Valid characters	All	All except punctuation 	Integers from 0 to 9,
marks, blank spaces, 	uppercase or lowercase
and other special	letters, and underscore
characters	(_) character

Must begin with. . .	Any valid character	A letter	A letter
except space

Note:	Paradox field names should not contain:
square brackets []
curly braces {}
pipes |
parentheses ()
the combination ->
or the hash symbol # by itself.


Connecting to InterBase

This section describes how to troubleshoot common InterBase SQL Link connection problems, and discusses various topics about using Borland SQL Links that are unique to InterBase.

InterBase Server Requirements

InterBase Client Workstation Requirements

InterBase Installation Changes

Testing the InterBase Connection

Troubleshooting InterBase Connection Problems

Borland Language Drivers For InterBase

Working with InterBase Servers

InterBase Data Type Translations

InterBase System Relations/Tables

InterBase Field-naming Rules


InterBase Server Requirements

Here is a list of software that should already be installed and running at the InterBase server before you install Borland SQL Links for Windows.

Category	Description

Database server software	InterBase version 3.3 or higher

Network protocol software	Network protocol software compatible with both the database server and the client workstation network protocol

For information on network protocol software and network access rights, see your system administrator.


InterBase Client Workstation Requirements

Here is a list of software that should already be installed and running at the client workstation. It also lists related files and parameters.

Category	Description

BDE application(s)	Supported BDE application, installed as required by the product documentation.

Requirements	1.5 MB of free disk space.Hardware and operating system that meets the requirements of your Borland desktop product.

Access rights	(For desktop products installed on the network server only)  If your Borland desktop product is installed on a network file server, make sure your network user account has Read and Write access rights to the product's BDE files (including IDAPICFG.EXE and the BDE configuration file). This directory is modified during SQL Link installation.

Network protocol software	Network protocol software compatible with both the server network protocol and the client workstation client database communication driver.

HOSTS file	A HOSTS file containing the name and IP address of each server that you plan to attach. This file must contain the name and IP address of at least one host. For example:   128.127.50.12   mis_server

SERVICES file	A SERVICES file containing the protocol for InterBase server access. During SQL Links installation, this file is updated to include the line:  gds_db   3050/tcp
Note: If you prefer, you can add the line to your SERVICES file manually, after SQL Links installation.


InterBase Installation Changes

When you install the InterBase SQL Link driver, the following items are installed in your workstation system:

Item added	Description

SQLD_IB.DLL	Dynamic Link Library comprising the new InterBase driver and its supporting files.

INTRBASE driver type	Added to Configuration Utility Driver Manager to enable basic configuration of Borland InterBase SQL Link driver.

INTRBASE alias type	Added to Configuration Utility Alias Manager to enable creation of an alias that can connect to an SQL Server database.

SQLD_IB.HLP	Help file for configuring InterBase driver.

READLINK.TXT	Borland SQL Links for Windows README file.

INTERBAS.MSG	InterBase message files, usually installed in C:\INTERBAS.

CONNECT.EXE	Utility to test connection between the workstation and the InterBase server; see "TCP/IP interface."

REMOTE.DLL
GDS.DLL	InterBase-supplied.DLLs.

InterBase server specification

to InterBase SERVICES file	The installation updates the workstation SERVICES file to add the correct protocol specification for InterBase server access. The line should be similar to:  gds_db 3050/tcp
For further information, see your database administrator.

TCP/IP interface

The following files provide InterBase client applications their interface to Winsock 1.1 compliant TCP/IP products.

File Name	Description

MVWASYNC.EXE	Asynchronous communication module

VSL.INI 	TCP/IP transport initialization file

WINSOCK.DLL	Windows Socket DLL

MSOCKLIB.DLL	Maps Windows socket calls to VSL driver

You can choose not to have the Installation program add a TCP/IP file by specifying "Use existing TCP file" during SQL Links for Windows installation.

For TCP/IP products that are not Winsock 1.1 compliant, InterBase client applications will require one of the following files:

File Name	TCP/IP Product

M3OPEN.EXE	3Com 3+Open TCP
Digital PATHWORKSMicrosoft LAN Manager TCP/IP

M3OPEN.DLL	3Com 3+Open TCP Version 2.0

MBW.EXE	Beame & Whiteside TCP/IP

MFTP.EXE	FTP PC/TCP

MHPARPA.DLL	HP ARPA Service for DOS

MNETONE.EXE	Ungermann-Bass Net/One

MNOVLWP.DLL	Novell LAN WorkPlace for DOS

MPATHWAY.DLL	Wollongong Pathway Access for DOS

MPCNFS.EXE	Sun PC NFS

MPCNFS2.EXE	Sun PC NFS v3.5

MPCNFS4.DLL	Sun PC NFS v4.0

MWINTCP.EXE	Wollongong WIN TCP\IP for DOS

Other communication protocols

The InterBase Workgroup Server for NetWare supports Novell SPX/IPX protocol. Two client files are required: NWIPXSPX.DLL, and NWCALLS.DLL.

The InterBase Workgroup Server for Widows NT supports Microsoft Named Pipes protocol. No additional client files are required to support Named Pipes, but the client machine must have Microsoft LAN Manager or Windows for Workgroups 3.1.1 installed.


Testing the InterBase Connection

To test whether you can connect to InterBase successfully, use the InterBase Connection Utility (CONNECT.EXE). This utility is stored in the same directory as the BDE files.

1	Choose File|Run from the Program Manager menu bar. The Run dialog box appears.

2	In the Command Line text box, enter the command to run CONNECT. (If you installed BDE files in C:\BDE, the command is C:\BDE\CONNECT.EXE.)

3	Choose OK. The InterBase Connect Utility dialog box appears.

4	Enter information in each text box:

Text box	Information required

Database Path	The path to an InterBase database, in the format: servername/usr/databaseDirectory/databaseName.gdbBe sure to use Unix-style forward-slash characters, and recall that Unix path names are case-sensitive.

User Name	A valid user name for the database you specified.

Password	A valid password for the user name you specified.

5	Choose Connect to test your network connection.

If the connection succeeds, a status message appears.

If the connection does not succeed, an error message appears. (For information on how to troubleshoot your installation, see Troubleshooting InterBase Connection Problems


Troubleshooting InterBase Connection Problems

If you have problems establishing an InterBase connection with SQL Link, try to isolate the problem the following way:

1	Run the Connection Utility (CONNECT.EXE) to determine if you can connect to the InterBase server from your client workstation. (Refer to "TCP/IP interface.")

If CONNECT does not work--Consult your database administrator.

If CONNECT works--Continue with step 2.

2	Verify that your InterBase SQL Link driver is correctly installed.

Reinstall SQL Link by following the procedures in Getting Started.

Also, check the SERVICES file for the correct protocol for InterBase server access. The line should be similar to:

gds_db 	3050/tcp

If you are unable to install the driver correctly--Consult your database administrator.

If the driver is correctly installed--Continue with step 3.

Note:	The following steps require a TELNET program and a PING program. These DOS programs are not included in the SQL Link product package, but they are available from your TCP/IP network software vendor. (Your TCP/IP network software package may use different names for these programs.)

If you do not have these programs on your client workstation, ask your network administrator to perform these tests for you.

3	Test the lower-level protocols.

A	Enter the TELNET command to ensure that the TCP libraries are correctly installed.

If the TCP libraries are correctly installed, the login: prompt is displayed. Login to the network and check for the presence of the database you are trying to attach.

If the message can't resolve hostname is displayed, check your workstation HOSTS file to ensure that you have an entry for your host name and IP address. The entry looks similar to:

128.127.50.12          mis_server

If TELNET is successful and CONNECT is not, you may have a problem with your InterBase installation. See your database administrator for assistance.

B	PING the server to check that the InterBase server itself is running and visible to your desktop application. (If PING is successful, the message servername is alive is displayed.)

If PING is successful but the TELNET command is not, there might be a problem with the inet daemon.

If you cannot PING the server, you might have a routing problem. Report the problem to your network administrator.

Note:	If you don't have PING on your DOS client, you can PING the DOS client from the server node (if you have access to the server node). Ask your network administrator for instructions.

If the lower-level protocols do not seem to be running--Consult your database administrator.

If the lower-level protocols are running--Continue with step 4.

4	Confirm that you have a login set in the InterBase security database, isc.gdb.

If so--Continue with step 5.

5	Check whether your BDE application InterBase alias is set up properly.

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


Borland Language Drivers For InterBase

Note:	The following table lists language drivers available for use with InterBase and their corresponding InterBase subtypes.  The language driver you choose must use the same collation sequence as your server, and the same character set as the one your server uses to pass data to your BDE application.  The default can be set at either a database or a table level. (For further information, see your InterBase server documentation.)

InterBase supports subtypes for different fields in the same relation. However, rules of a language driver you specify will apply to a relation as a whole. The result of a query on a relation containing fields of different subtypes may vary according to where it was processed. In such a case, set SQLQRYMODE to SERVER to produce consistent query results.

Long driver name	Short driver name	InterBase subtype

Paradox "ascii"	ascii	0 (default), 1, 100, 101

Borland DAN Latin-1	BLLT1DA0	139

DEU LATIN1	BLLT1DE0	144

ENG LATIN1	BLLT1UK0	152

ENU LATIN1	BLLT1US0	153

ESP LATIN1	BLLT1ES0	149

FIN LATIN1	BLLT1FI0	141

FRA LATIN1	BLLT1FR0	142

FRC LATIN1	BLLT1CA0	143

ISL LATIN1	BLLT1IS0	145

ITA LATIN1	BLLT1IT0	146

NLD LATIN1	BLLT1NL0	140

NOR LATIN1	BLLT1NO0	105

PTG LATIN1	BLLT1PT0	154

Paradox INTL	INTL	102

Pdox NORDAN4	NORDAN40	105

Pdox SWEDFIN	SWEDFIN	106

SVE LATIN1	BLLT1SV0	151

Note:	For information on InterBase subtypes that correspond to dBASE language drivers, contact Borland Technical Support.


Working with InterBase Servers

This section provides information about InterBase servers and their implementation of SQL. The topics discussed in this section cover aspects of InterBase that differ from other SQL database products.

Here is a list of the general items that you might find helpful in working with InterBase.

Item	Description

Dynamic Link Library (DLL) name	SQLD_IB.DLL

Case-sensitive for data?	Yes (including pattern matching)

Case-sensitive for objects
(tables, columns, indexes)?	No

Does the server require an explicit 	Yes
request to begin a transaction for
multistatement transaction
processing?

Does the server require that you 	No
explicitly start a transaction for
multi-statement transaction
processing in pass-through SQL?

Implicit row IDs	No

BLOB handles	InterBase BLOBs have handles. However, InterBase CHAR and VARCHAR columns that are more than 255 characters long are treated as non-handle BLOBs.

Maximum size of single BLOBs	32K
read (if BLOB handles are not
supported)


InterBase Data Type Translations

Certain database operations cause SQL Link to convert data from Paradox or dBASE format to InterBase format. For example, a BDE application that copies or appends data from a local table to an InterBase table causes SQL Link to convert the local data to InterBase format before performing the copy or append operation.

Other database operations cause a conversion in the opposite direction, from InterBase format to Paradox or dBASE format. For example, suppose you run a local query against one or more SQL tables. During the query, SQL Link converts any data originating in an SQL database to Paradox or dBASE format (depending on the answer format requested) before placing the data in the local answer table.

The following topics list InterBase, Paradox, and dBASE data types and show how SQL Link translates between them:

From InterBase Data Types

From Paradox Data Types

From dBASE Data Types

From Paradox Physical Types

From dBASE Physical Types

From InterBase Physical Types

InterBase Equivalents to Standard SQL Data Types


From InterBase Data Types

FROM: InterBase	TO: Paradox	TO: dBASE

SHORT	Short	Number {6.0}

LONG	Number	Number {11.0}

FLOAT	Number	Float {20.4}

DOUBLE	Number	Float {20.4}

DATE	DateTime	Date

BLOB	Binary	Memo

BLOB/1	Memo	Memo

CHAR(1-255)	Alphanumeric(n)	Character(n)2

CHAR(greater than 255)	Memo	Memo

VARYING(1-255)	Alphanumeric(n)	Character(n)2

VARYING(greater than 255)	Memo	Memo

ARRAY	Binary	Memo


From Paradox Data Types

FROM: Paradox	TO: InterBase	TO: dBASE

Alphanumeric(n)	VARYING(n)	Character(n)

Number	DOUBLE	Float {20.4}

Money	DOUBLE	Float {20.4}

Date	DATE	Date

Short	SHORT	Number {6.0}

Memo	BLOB/1 (Text)	Memo

Formatted memo	BLOB (Binary)	Memo

Binary	BLOB (Binary)	Memo

Graphic	BLOB (Binary)	Memo

OLE	BLOB (Binary)	Memo

Long	Long	Number {11.0}

Time	Character {>8}	Character {>8}

DateTime	Date	Character {>8}

Bool	Character {1}	Bool

AutoInc	Long	Number {11.0}

Bytes	BLOB	Bytes

BCD	N/A	N/A


From dBASE Data Types

FROM: dBASE	TO: InterBase	TO: Paradox

Character(n)	VARYING(n)	Alphanumeric(n)

Number	Float	SHORT, DOUBLEDOUBLEShort number, NumberNumber

Date	DATE	Date

Lock	Character {24}	Alpha {24}

Bytes	BLOB	Bytes

Bool	Character {1}	Bool

Memo	BLOB/1	Memo in append, copy, and local query operations.


From Paradox Physical Types

Paradox physical	BDE logical	dBASE

fldPDXCHAR	fldZSTRING	fldDBCHAR

fldPDXNUM	fldFLOAT	fldDBFLOAT {20.4}

fldPDXMONEY	fldFLOAT/fldstMONEY	fldDBFLOAT {20.4}

fldPDXDATE	fldDATE	fldDATE

fldPDXSHORT	fldINT16	fldDBNUM {6.0}

fldPDXMEMO	fldBLOB/fldstMEMO	fldDBMEMO

fldPDXBINARYBLOB	fldBLOB/fldstBINARY	fldDBMEMO

fldPDXFMTMEMO	fldBLOB/fldstFMTMEMO	fldDBMEMO

fldPDXOLEBLOB	fldBLOB/fldstOLEOBJ	fldDBMEMO

fldPDXGRAPHIC	fldBLOB/fldstGRAPHIC	fldDBMEMO

fldPDXBLOB	fldPDXMEMO	fldDBMEMO

fldPDXLONG	fldINT32	fldDBNUM {11.0}

fldPDXTIME	fldTIME	fldDBCHAR {>8}

fldPDXDATETIME	fldTIMESTAMP	fldDBCHAR {30}

fldPDXBOOL	fldBOOL	fldDBBOOL

fldPDXAUTOINC	fldINT32	fldDBNUM {11.0}

fldPDXBYTES	fldBYTES	fldDBBYTES

fldPDXBCD	fldBCD	fldDBCHAR


From dBASE Physical Types

dBASE physical	BDE logical	Paradox

fldDBCHAR	fldZSTRING	fldPDXCHAR

fldDBNUM	if( iUnits2=0 && iUnits1<5 )	fldINT16 else fldFLOAT fldPDXSHORTfldPDXNUM

fldDBMEMO	fldBLOB	fldPDXMEMO

fldDBBOOL	fldBOOL	fldPDXBOOL

fldDBDATE	fldDATE	fldPDXDATE

fldDBFLOAT	fldFLOAT	fldPDXNUM

fldDBLOCK	fldLOCKINFO	fldPDXCHAR {24}

fldDBBINARY	fldBLOB/fldstTYPEDBINARY	fldPDXBINARYBLOB

fldDBOLEBLOB	fldBLOB/fldstDBSOLEOBJ	fldPDXOLEBLOB


From InterBase Physical Types

InterBase physical	BDE logical	Paradox physical	dBASE physical

fldIBSHORT	fldINT16	fldPDXSHORT	fldDBNUM {6.0}

fldIBLONG	fldINT32	fldPDXLONG	fldDBNUM {11.0}

fldIBFLOAT	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldIBDOUBLE	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldIBCHAR < 255	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldIBCHAR > 255	fldBLOB	fldSTMEMO	fldDBCHAR

fldIBVARYING < 255	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldIBVARYING > 255	fldBLOB	fldSTMEMO	fldDBCHAR

fldIBDATE	fldTIMESTAMP	fldPDXDATETIME	fldDBDATE

fldIBBLOB	fldBLOB	fldPDXBINARYBLOB	fldDBMEMO

fldIBTEXTBLOB	fldBLOB/fldstMEMO	fldPDXMEMO	fldDBMEMO


InterBase Equivalents to Standard SQL Data Types

When you use pass-through SQL commands to create or alter an InterBase table, you must use standard SQL data types. Here is a list of standard SQL data types and their corresponding InterBase data types.

FROM: SQL	TO: InterBase

SMALLINT	SHORT

INTEGER	LONG

DATE	DATE

CHAR(n)	CHAR(n)

VARCHAR(n)	VARYING

DECIMAL	LONG

FLOAT	FLOAT

LONG FLOAT	DOUBLE

BLOB	BLOB

Note:	SQL does not support the InterBase ARRAY data type.


InterBase System Relations/Tables

InterBase includes a special set of tables called system relations. System relations describe privileges, indexes, SQL table structures, and other items that define relationships within a database. You can access system relations with passthrough SQL from your desktop product through the SQL Editor (see your desktop application documentation).

Here is a list of InterBase system relations you can access through SQL Link.

Table name	Use

RDB$RELATIONS	Lists all tables and views

RDB$RELATION_FIELDS	Lists columns of tables and views

RDB$INDICES	Lists indexes


InterBase Field-naming Rules

Here is a list of field-naming rules for Paradox, dBASE, and InterBase.

Naming rule	Paradox	dBASE	InterBase

Max length (characters)	25	10	31

Valid characters	All	All alphanumeric except	Letters (A-Z, a-z), digits, $, or _
punctuation marks, blank
spaces, and other special
characters

Must begin with. . .	Any valid 	A letter 	Letters only (A-Z, a-z
character
except space)

Note:	You may not use InterBase reserved words for table names. See the InterBase Language Reference for a list of reserved words.


Connecting to ORACLE

This section describes how to troubleshoot common Borland ORACLE SQL Link connection problems, and discusses various topics about using Borland SQL Links that are unique to ORACLE.

ORACLE Server Requirements

ORACLE Client Workstation Requirements

ORACLE Installation Changes

Special SQL Link Driver Settings for ORACLE

Borland Language Drivers For ORACLE

Troubleshooting ORACLE Connection Problems

Working with ORACLE Servers


ORACLE Server Requirements

This table lists software that should already be installed and running at the ORACLE server before you install the Borland ORACLE SQL Link driver.

Category	Description

Database server software	ORACLE version 6.0 or greater

Network protocol software	ORACLE SQL*NET

For information on network protocol software and network access rights, see your system administrator.


ORACLE Client Workstation Requirements

This table lists software that should already be installed and running at the client workstation. It also lists related files and parameters.

Category	Description

Network protocol software	Network protocol software compatible with both the server network protocol and the client workstation client database communication driver.SQL*Net driver (.EXE or.DLL)


ORACLE Installation Changes

When you install the Borland ORACLE SQL Link driver, the following changes take place in your workstation system:

Item added	Description

SQLD_ORA.DLL	Dynamic Link Library comprising the new ORACLE SQL Link driver and its supporting files.

ORACLE driver type	Added to Configuration Utility Driver Manager to enable basic configuration of Borland ORACLE SQL Link driver.

ORACLE alias type	Added to Configuration Utility Alias Manager to enable creation of an alias that can connect to an ORACLE database.

SQLD_ORA.HLP	Help file for configuring ORACLE driver.

READLINK.TXT	Borland SQL Links for Windows README file.

ORA6WIN.DLL	Windows Dynamic Link Library for ORACLE 6.

ORA7WIN.DLL	Windows Dynamic Link Library for ORACLE 7.

SQL13WIN.DLL	ORACLE-supplied DLL.

SQLWIN.DLL	ORACLE-supplied DLL.

ORAWE850.LD	Language driver using Western European sort order; based on DOS code page 850.

BLROM800.LD	SQL Link ROMAN8 language driver using binary collation sequence.


Special SQL Link Driver Settings for ORACLE

The following topics describe driver configuration parameters that are unique to ORACLE:

NET PROTOCOL

Network transport is used to communicate with the SQL server. This table describes NET PROTOCOL options.

Value	Description

3270	IBM 3270 protocol

APPC	IBM APPC LU 6.2 protocol

ASYNC	Asynchronous (dial-up) access protocol

DECNET	Digital Equipment Corporation DECnet protocol

NAMED PIPES	Named Pipes protocol, as used by OS/2

NETBIOS	NetBios protocol, as used by LAN Manager and other PC LANs

SPX/IPX	SPX/IPX protocol, as used by Novell NetWare

TCP/IP	Transport Control Protocol/Internet Protocol, as used by UNIX and VAX workstations

VINES	Banyan VINES protocol

VENDOR INIT

Vendor-specific initialization information; identifies whether ORA6WIN.DLL or ORA7WIN.DLL is installed at the workstation. If no value is specified here, SQL Link looks first for ORA6WIN.DLL, then ORA7WIN.DLL.


Borland Language Drivers For ORACLE

The following table lists language drivers available for use with ORACLE, their corresponding character sets, and Borland collation sequences. Choose the language driver that uses the same collation sequence as your server, and the same character set as the one your server uses to pass data to your BDE application.

Note:	If you need to use a language driver that does not properly mimic the ORACLE server collation sequence, be sure to set SQLQRYMODE to SERVER in your ORACLE database alias.

Long driver name	Short driver name	Character set	Collation sequence

Borland ENU Latin-1	BLLT1US0 	ISO8859.1(ANSI)	Binary

dBASE FRA cp437	DB437FR0	DOS CODE PAGE 437	dBASE French

dBASE FIN cp437	DB437FI0	DOS CODE PAGE 437	dBASE Finnish

dBASE ENU cp437	DB437US0	DOS CODE PAGE 437	dBASE English/US

dBASE NOR cp865	DB865NO0	DOS CODE PAGE 865	dBASE Norwegian

dBASE SVE cp437	DB437SV0	DOS CODE PAGE 437	dBASE Swedish

dBASE SVE cp850	DB850SV1	DOS CODE PAGE 850	dBASE Swedish850

dBASE ESP cp437	DB437ES1	DOS CODE PAGE 437	dBASE Spanish

dBASE NLD cp437	DB437NL0	DOS CODE PAGE 437	dBASE Dutch

dBASE ESP cp850	DB850ES1	DOS CODE PAGE 850	dBASE Spanish850

dBASE ENG cp437	DB437UK0	DOS CODE PAGE 437	dBASE English/UK

dBASE ENU cp850	DB850US0	DOS CODE PAGE 850	dBASE English/US

dBASE FRC cp863	DB863CF1	DOS CODE PAGE 863	dBASE French Canadian

dBASE ENG cp850	DB850UK0	DOS CODE PAGE 850	dBASE English850/UK

dBASE ITA cp850	DB850IT1	DOS CODE PAGE 850	dBASE Italian850

dBASE DEU cp850	BD850DE0	DOS CODE PAGE 850	dBASE German850

dBASE FRA cp850	DB850FR0	DOS CODE PAGE 850	dBASE French850

dBASE ITA cp437	DB437IT0	DOS CODE PAGE 437	dBASE Italian

dBASE NLD cp850	DB850NL0	DOS CODE PAGE 850	dBASE Dutch

dBASE FRC cp850	DB850CF0	DOS CODE PAGE 850	dBASE French Canadian850

dBASE DAN cp865	DB865DA0	DOS CODE PAGE 865	dBASE Danish

dBASE DEU cp437	DB437DE0	DOS CODE PAGE 437	dBASE German

Oracle SQL WE850	ORAWE850	DOS CODE PAGE 850	ORACLE multi-lingual Western European sort order

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)	Paradox 'intl' 850

Pdox ANSI NORDAN4	ANSINOR4	ISO8859.1 (ANSI)	Paradox 'nordan40'

Pdox ANSI SWEDFIN	ANSISWFN	ISO8859.1 (ANSI)	Paradox 'swedfin'

Pdox ESP ANSI	ANSISPAN	ISO8859.1 (ANSI)	Paradox ESP437

SQL Link ROMAN8	BLROM800	ROMAN8	Binary


Troubleshooting ORACLE Connection Problems

If you have problems establishing an ORACLE connection with SQL Link,

1	Confirm that the ORACLE server is online and the correct SQL*Net listener is running.

If not--Consult your database administrator.

If so--Continue with step 2.

Note:	The easiest way to ensure that all of these parameters are set correctly is to reinstall your ORACLE workstation software (for example, type orainst at the DOS prompt). This sets up the appropriate directories, copies the appropriate drivers and programs, creates the configuration file, and sets up the correct environment variables.

2	If you have file and print services, verify that the network layer is functioning by trying to share files and print jobs to the spooler.

If not--Consult your database administrator.

If so--Continue with step 3.

3	Use your ORACLE tools to verify the connection at each layer.

A.	Use SQL*DBA or SQL*Plus to enter a CONNECT command. For example:

SQLDBA> connect jlee/trapper @p:MIS_SERVER;

You can then enter a SQL command to test the connection.
Each command should end with a semicolon. For example:

SQLDBA> select * from dictionary;

B.	Verify that your AUTOEXEC.BAT file contains the lines:

SET CONFIG=C:\ORACLE6\CONFIG.ORA

PATH=C:\;C:\DOS;C:\ORACLEx;C:\ORACLEx\BIN

(ORACLEx is the name of your ORACLE directory.)

If not--Consult your database administrator.

If so--Continue with step 4.

4	Check whether your BDE application ORACLE alias is set up properly.

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

For more information on ORACLE diagnostic tools, see your ORACLE documentation.


Working with ORACLE Servers

This section provides information about ORACLE servers and their implementation of SQL. The topics discussed in this section cover aspects of ORACLE that differ from other SQL database products.

ORACLE Data Type Translations

ORACLE System Tables

ORACLE Field-naming Rules

This table lists the general items that you might find helpful in working with ORACLE servers.

Item	Description

Dynamic Link Library (DLL) name	SQLD_ORA.DLL

Case-sensitive for data?	Yes

Case-sensitive for objects 	No
(such as tables, columns
and indexes)?

Does the server require 	Yes
an explicit request to
begin a transaction for
multistatement transaction
processing?

Does the server require that 	No
you explicitly start a transaction
for multistatement transaction
processing in passthrough SQL?

Implicit row IDs	Yes

Blob handles	No

Maximum size of single	64K
blob read (if blob handles
are not supported)


ORACLE Data Type Translations

Certain database operations cause SQL Link to convert data from Paradox or dBASE format to ORACLE format. For example, a BDE application that copies or appends data from a local table to an ORACLE table causes SQL Link to convert the local data to ORACLE format before performing the copy or append operation.

Other database operations cause a conversion in the opposite direction, from ORACLE format to Paradox or dBASE format. For example, suppose you run a local query against one or more SQL tables. During the query, SQL Link converts any data originating in an SQL database to Paradox or dBASE format (depending on the answer format requested) before placing the data in the local answer table.

The following topics contain tables that list ORACLE, Paradox, and dBASE data types and show how SQL Link translates between these data types:

From ORACLE Data Types

From Paradox Data Types

From dBASE Data Types

From Paradox Physical Types

From dBASE Physical Types

From ORACLE Physical Types


From ORACLE Data Types

FROM: ORACLE	TO: Paradox	TO: dBASE

CHAR(n)	VARCHAR(n)	Alphanumeric(n)Character(n)

DATE	DateTime	Date

FLOAT	Number	Number {20.4}

LONG	Memo	Memo

LONG RAW	Binary	Memo

NUMBER	Number	Float {20.4}

RAW	Binary	Memo

VARCHAR2 (CHAR <255)	Alphanumeric(n)	Character(n)1

VARCHAR2 (CHAR >255)	Memo	Memo


From Paradox Data Types

FROM: Paradox	TO: ORACLE	TO: dBASE

Alphanumeric(n)	CHAR(n)	Character(n)

Number	NUMBER	Float {20.4}

Money	NUMBER	Float {20.4}

Date	DATE	Character {date/time}

Short	NUMBER	Number {6.0}

Memo	LONG	Memo

Formatted memo	LONG RAW	Memo

Binary	LONG RAW	Memo

Graphic	LONG RAW	Memo

OLE	LONG RAW	Memo

Long	NUMBER	Number {11.0}

Time	CHARACTER {>8}	Character {>8}

Datetime	DATE	Character {>8}

Logical	CHARACTER {1}	Bool

AutoInc	NUMBER	Number {11.0}

Bytes	LONG RAW	BYTES

BCD	N/A	N/A


From dBASE Data Types

FROM: dBASE	TO: ORACLE	TO: Paradox

Character	CHAR(n)	Alphanumeric(n)

Number1	NUMBER	Short, Number

Float	NUMBER	Short, Number

Date	DATE	Date

Logical	CHAR(1)	Bool

Memo	LONG	Memo

Bytes	LONG RAW	Bytes

Lock	CHAR(24)	Alphanumeric {24}.


From Paradox Physical Types

Paradox physical	BDE logical	dBASE physical

fldPDXCHAR	fldZSTRING	fldDBCHAR

fldPDXNUM	fldFLOAT	fldDBFLOAT {20.4}

fldPDXMONEY	fldFLOAT/fldstMONEY	fldDBFLOAT {20.4}

fldPDXDATE	fldDATE	fldDATE

fldPDXSHORT	fldINT16	fldDBNUM {6.0}

fldPDXMEMO	fldBLOB/fldstMEMO	fldDBMEMO

fldPDXBINARYBLOB	fldBLOB/fldstBINARY	fldDBMEMO

fldPDXFMTMEMO	fldBLOB/fldstFMTMEMO	fldDBMEMO

fldPDXOLEBLOB	fldBLOB/fldstOLEOBJ	fldDBMEMO

fldPDXGRAPHIC	fldBLOB/fldstGRAPHIC	fldDBMEMO

fldPDXBLOB	fldPDXMEMO	fldDBMEMO

fldPDXLONG	fldINT32	fldDBNUM {11.0}

fldPDXTIME	fldTIME	fldDBCHAR {>8}

fldPDXDATETIME	fldTIMESTAMP	fldDBCHAR {30}

fldPDXBOOL	fldBOOL	fldDBBOOL

fldPDXAUTOINC	fldINT32	fldDBNUM {11.0}

fldPDXBYTES	fldBYTES	fldDBBYTES

fldPDXBCD	fldBCD	fldDBCHAR


From dBASE Physical Types

dBASE physical	BDE logical	Paradox physical

fldDBCHAR	fldZSTRING	fldPDXCHAR

fldDBNUM	if( iUnits2=0 && iUnits1<5 )	fldINT16 else fldFLOAT fldPDXSHORTfldPDXNUM

fldDBMEMO	fldBLOB	fldPDXMEMO

fldDBBOOL	fldBOOL	fldPDXBOOL

fldDBDATE	fldDATE	fldPDXDATE

fldDBFLOAT	fldFLOAT	fldPDXNUM

fldDBLOCK	fldLOCKINFO	fldPDXCHAR {24}

fldDBBINARY	fldBLOB/fldstTYPEDBINARY	fldPDXBINARYBLOB

fldDBOLEBLOB	fldBLOB/fldstDBSOLEOBJ	fldPDXOLEBLOB


From ORACLE Physical Types

ORACLE physical	BDE logical	Paradox physical	dBASE physical

fldORACHAR	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldORARAW	fldVARBYTES	fldPDXBINARYBLOB	fldDBMEMO

fldORADATE	fldTIMESTAMP	fldPDXDATETIME	fldDBDATE

fldORANUMBER	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldORALONG	fldBLOB/fldstMEMO	fldPDXMEMO	fldDBMEMO

fldORALONGRAW	fldBLOB/fldstBINARY	fldPDXBINARYBLOB	fldDBMEMO

fldORAVARCHAR	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldORAVARCHAR2 <255	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldORA VARCHAR2 >255	fldBLOB/fldstMEMO	fldPDXMEMO	fldDBMEMO

fldORAFLOAT	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}


ORACLE System Tables

ORACLE includes a special set of system tables. System tables describe privileges, indexes, SQL table structures, and other items that define relationships within a database.

Here is a list of ORACLE system tables you can access through SQL Link.

Table Name	Use

ACCESSIBLE_COLUMNS	Lists the columns of all tables and clusters.

ACCESSIBLE_TABLES	Lists the tables and views accessible to the user.

ALL_COL_GRANTS_MADE	Lists the columns that the owner has granted other users access to.

ALL_COL_GRANTS_RECD	Lists the columns the user can access.

ALL_INDEXES	Describes indexes on tables accessible to the user.

ALL_TABLES	Lists all tables accessible to the user.

ALL_CATALOG	Lists all objects accessible to the user.

ALL_TAB_GRANTS_MADE	Lists the tables that the owner has granted other users access to.

ALL_TAB_GRANTS_RECD	Lists the tables the user can access.

ALL_USERS	Lists information on all users of the database.

CONSTRAINT_DEFS	Lists constraint definitions on accessible tables.


ORACLE Field-naming Rules

Here is a list of field-naming rules for Paradox, dBASE, and ORACLE.

Naming rule	Paradox	dBASE	ORACLE

Max length (characters)	25	10	30

Valid characters	All	All except punctuation marks, 	A-Z, 0-9, -, $, #
blank spaces, and other special
characters

Must begin with. . .	Any valid character
except space	A letter	A letter

Note:	You may not use ORACLE reserved words for remote table names, quoted table names, or quoted index names.  For a list of reserved words and other naming restrictions, see the ORACLE Programmer's Reference.


Connecting to SYBASE and Microsoft SQL Servers

This section describes how to troubleshoot common Borland SYBASE and Microsoft SQL Server SQL Link connection problems, and discusses topics about using Borland SQL Links that are unique to SQL Server:

SQL Server Requirements

SQL Client Workstation Requirements

SQL Installation Changes

Special SQL Link Driver Settings for SYBASE

Borland Language Drivers For SQL Server

Troubleshooting SQL Connection Problems

Working with SQL Servers


SQL Server Requirements

Here is a list of software that should already be installed and running at the SQL Server before you install the Borland SQL Server SQL Link driver.

Category	Description

Database server software

SYBASE SQL Server 	Version 4.x

Microsoft SQL Server 	Version 4.x

Network protocol software

SYBASE SQL Server	Supporting the SYBASE Net libraries

Microsoft SQL Server	Supporting SPX/IPX or Named Pipes protocol (Microsoft LAN Manager, 3Com 3+Open, or Novell NetWare Requestor for OS/2)

For information on network protocol software and network access rights, see your system administrator.


SQL Client Workstation Requirements

Here is a list of software that should already be installed and running at the client workstation. Related files and parameters are included.

Category	Description

BDE application(s)	Supported BDE application, installed as required by the product documentation.

Requirements	1.5 MB of free disk space.Hardware and operating system that meets the requirements of your BDE application.

Access rights	(For applications installed on the network server only.)
If your BDE application is installed on the shared disk of a network file server, make sure your network user account has Read and Write access rights to the application's BDE files (including BDECFG.EXE and the IDAPI.CFG). This directory is modified during SQL Link installation.

Network protocol software	Network protocol software compatible with both the server network protocol and the client workstation client database communication driver.Net library driver.


SQL Installation Changes

When you install the Borland SQL Server SQL Link driver (called SYBASE in the Configuration Utility), the following changes take place in your workstation system:

Item added	Description

SQLD_SS.DLL	Dynamic Link Library comprising the new SYBASE driver and its supporting files.

SYBASE driver type	Added to Configuration Utility Driver Manager to enable basic configuration of Borland SYBASE SQL Link driver.

SYBASE alias type	Added to Configuration Utility Alias Manager to enable creation of an alias that can connect to an SQL Server database.

SQLD_SS.HLP	Help file for configuring SYBASE driver.

READLINK.TXT	Borland SQL Links for Windows README file.

W3DBLIB.DLL	SYBASE/Microsoft SQL Server library.

DBNMP3.DLL	SYBASE/Microsoft SQL Server Named Pipes library.

BLROM800.LD	SQL Link ROMAN8 language driver using a binary collation sequence.

SYDC850.LD	SYBASE language driver with a dictionary supporting case-sensitive collation; based on DOS code page 850.

SYDC437.LD	SYBASE language driver with a dictionary supporting case-sensitive collation; based on DOS code page 437.


Special SQL Link Driver Settings for SYBASE

The following topics describe driver configuration parameters that are unique to SYBASE:

Blob EDIT LOGGING

Enables or disables the logging of any edits to blob (Binary Large OBject) fields. Possible values are TRUE (the default) or FALSE. When set to FALSE, this option helps minimize blob space requirements and increase performance.

Note:	If you set blob EDIT LOGGING to FALSE, you must also set BULKCOPY to ON at the server. For more information, see your SQL Server documentation.

CONNECT TIMEOUT

Specifies the amount of time the workstation will retry when attempting to attach to the SQL server. The default is 60 seconds.

DATABASE NAME

Name of the target SQL database.

DATE MODE

The format in which the driver sends dates to the SQL server. Valid settings are 0 (MDY), 1 (DMY), and 2 (YMD).

TIMEOUT

Specifies the maximum amount of time that the workstation waits for results to return from the server. The default is 500 seconds.

You may want to change the TIMEOUT value to minimize conflicts between operations. For best performance, determine how much time a complex query would take to complete successfully on your network, then set TIMEOUT to a slightly larger number than that. For example, if you often run complex queries that can take up to 120 seconds to complete, be sure to set the TIMEOUT value to more than 120 seconds.

MAX QUERY TIME

Specifies the maximum amount of time that SQL Link will wait for query execution to complete before canceling the operation. The default is 3,600 seconds.


Borland Language Drivers For SQL Server

The following table lists language drivers available for use with SQL Server, their corresponding character sets, and Borland collation sequences. The language driver you choose must use the same collation sequence as your server, and the same character set as the one your server uses to pass data to your BDE application.

Long driver name	Short driver name	Character set	Collation sequence

Borland ENU Latin-1	BLLT1US0 	ISO8859.1(ANSI)	Binary

dBASE FRA cp437	DB437FR0	DOS CODE PAGE 437	dBASE French

dBASE FIN cp437	DB437FI0	DOS CODE PAGE 437	dBASE Finnish

dBASE ENU cp437	DB437US0	DOS CODE PAGE 437	dBASE English/US

dBASE NOR cp865	DB865NO0	DOS CODE PAGE 865	dBASE Norwegian

dBASE SVE cp437	DB437SV0	DOS CODE PAGE 437	dBASE Swedish

dBASE SVE cp850	DB850SV1	DOS CODE PAGE 850	dBASE Swedish850

dBASE ESP cp437	DB437ES1	DOS CODE PAGE 437	dBASE Spanish

dBASE NLD cp437	DB437NL0	DOS CODE PAGE 437	dBASE Dutch

dBASE ESP cp850	DB850ES1	DOS CODE PAGE 850	dBASE Spanish850

dBASE ENG cp437	DB437UK0	DOS CODE PAGE 437	dBASE English/UK

dBASE ENU cp850	DB850US0	DOS CODE PAGE 850	dBASE English/US

dBASE FRC cp863	DB863CF1	DOS CODE PAGE 863	dBASE French Canadian

dBASE ENG cp850	DB850UK0	DOS CODE PAGE 850	dBASE English850/UK

dBASE ITA cp850	DB850IT1	DOS CODE PAGE 850	dBASE Italian850

dBASE DEU cp850	BD850DE0	DOS CODE PAGE 850	dBASE German850

dBASE FRA cp850	DB850FR0	DOS CODE PAGE 850	dBASE French850

dBASE ITA cp437	DB437IT0	DOS CODE PAGE 437	dBASE Italian

dBASE NLD cp850	DB850NL0	DOS CODE PAGE 850	dBASE Dutch

dBASE FRC cp850	DB850CF0	DOS CODE PAGE 850	dBASE French Canadian850

dBASE DAN cp865	DB865DA0	DOS CODE PAGE 865	dBASE Danish

dBASE DEU cp437	DB437DE0	DOS CODE PAGE 437	dBASE German

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)	Paradox 'intl' 850

Pdox ANSI NORDAN4	ANSINOR4	ISO8859.1 (ANSI)	Paradox 'nordan40'

Pdox ANSI SWEDFIN	ANSISWFN	ISO8859.1 (ANSI)	Paradox 'swedfin'

Pdox ESP ANSI	ANSISPAN	ISO8859.1 (ANSI)	Paradox ESP437

SQL Link ROMAN8	BLROM800	ROMAN8	Binary

SYBASE SQL Dic437	SYDC437	DOS CODE PAGE 437	SYBASE dict. with case-sensitivity

SYBASE SQL Dic850	SYDC850	DOS CODE PAGE850	SYBASE dict. with case-sensitivity


Troubleshooting SQL Connection Problems

If you have problems establishing an SQL Server connection with SQL Link,

1	Confirm that the SQL Server is online.

If not--Consult your database administrator.

If so--Continue with step 2.

2	Verify that the network layer is functioning by trying to share files and print jobs to the spooler.

If you are unsuccessful--Consult your database administrator.

If you succeed--Continue with step 3.

3	Use your SYBASE or Microsoft tools to verify the connection at each layer.

For SYBASE, use the DOS DBPING.EXE program or the Windows WDPING.EXE program to check the network connection. Use the DOS ISQL.EXE program to verify the server connection.

For Microsoft SQL Server, use the DOS system administrator facility (SAF.EXE) to verify the connection.

Enter a valid query using either tool to verify your connection. For example:

select @@version

If you are not connected--Consult your database administrator.

If you are connected--Continue with step 4.

4	Check whether your BDE application SYBASE alias is set up properly.

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

For more information on your vendor-supplied diagnostic tools, see your SQL Server documentation.


Working with SQL Servers

This section provides information about SQL Servers and their implementation of SQL. The topics discussed in this section cover aspects of SQL Servers that differ from other SQL database products.

Here is a list of general items that you might find helpful in working with SYBASE or Microsoft servers:

Item	Description

Product name	SYBASE

SQL dialect	SYBASE TRANSACT-SQL

Dynamic Link Library (DLL) name	SQLD_SS.DLL

Case-sensitive for data?	As installed

Case-sensitive for objects 	As installed
(such as tables, columns,
and indexes)?

Does the server require an 	Yes
explicit request to begin a
transaction for multi-statement
transaction processing?

Does the server require that 	Yes
you explicitly start a transaction
for multi-statement transaction
processing in passthrough SQL?

Implicit row IDs	No

Blob handles	No

Maximum size of single BLOB 	32K
read (if BLOB handles are
not supported)


SQL Server Data Type Translations

Certain database operations cause SQL Link to convert data from Paradox or dBASE format to SQL Server format. For example, a BDE application that copies or appends local data to an SQL Server table causes SQL Link to convert the local data to SQL Server format before performing the copy or append operation.

Other database operations cause a conversion in the opposite direction, from SQL Server format to Paradox or dBASE format. For example, suppose you run a local query against one or more remote tables. During the query, SQL Link converts any data originating in an SQL database to Paradox or dBASE format (depending on the type of answer required) before placing the data in the local answer table.

The following topics contain lists of SQL Server, Paradox, and dBASE data types and show how SQL Link translates between these data types:

From SQL Server Data Types

From Paradox Data Types

From dBASE Data Types

From Paradox Physical Types

From dBASE Physical Types

From SQL Server Physical Types


From SQL Server Data Types

FROM: SQL Server	TO: Paradox	TO: dBASE

Char(n)	Alphanumeric(n)	Character(n)

Binary(n)	Binary	Memo

Bit	Alphanumeric(1)	Bool

DateTime	DateTime	Date

Float	Number	Float {20.4}

Float4	Number	Float {20.4}

Money4	Money	Float {20.4}

DateTime4	DateTime	Date

Image	Binary	Memo

Int	Number	Number {11.0}

Money	Money	Number {20.4}

SmallDateTime	DateTime	Date

SmallFloat	Number	Number

SmallInt	Short	Number {6.0}

SmallMoney	Money	Number {20.4}

Text	Memo	Memo

TimeStamp	Binary	Memo

TinyInt	Short	Number {6.0}

VarBinary(n)	Binary	Memo

VarChar(n)	Alphanumeric(n)	Character(n)


From Paradox Data Types

FROM: Paradox	TO: SQL Server	TO: dBASE

Alphanumeric(n)	varchar(n)	Character(n)

Number	float	Float {20.4}

Money	money	Float {20.4}

Date	datetime	Date

Short	smallint	Number {6.0}

Memo	text	Memo

Formatted memo	image	Memo

Binary	image	Memo

Graphic	image	Memo

OLE	image	Memo

Long	Int	Number {11.0}

Time	Character {>8}	Character {>8}

DateTime	DateTime	Character {>8}

Bool	Bit	Bool

AutoInc	Int	Number {11.0}

Bytes	Image	Bytes

BCD	N/A	N/A


From dBASE Data Types

FROM: dBASE	TO: SQL Server	TO: Paradox

Character(n)	varchar(n)	Alphanumeric(n)

Number	int, float	Number

Float number1	int, float	Number

Date	datetime	Date

Bool	bit	Bool

Lock	character {24.0}	Alphanumeric {24.0}

Bytes	image	Bytes

Memo	text	Memo


From Paradox Physical Types

Paradox physical	BDE logical	dBASE physical

fldPDXCHAR	fldZSTRING	fldDBCHAR

fldPDXNUM	fldFLOAT	fldDBFLOAT {20.4}

fldPDXMONEY	fldFLOAT/fldstMONEY	fldDBFLOAT {20.4}

fldPDXDATE	fldDATE	fldDATE

fldPDXSHORT	fldINT16	fldDBNUM {6.0}

fldPDXMEMO	fldBLOB/fldstMEMO	fldDBMEMO

fldPDXBINARYBLOB	fldBLOB/fldstBINARY	fldDBMEMO

fldPDXFMTMEMO	fldBLOB/fldstFMTMEMO	fldDBMEMO

fldPDXOLEBLOB	fldBLOB/fldstOLEOBJ	fldDBMEMO

fldPDXGRAPHIC	fldBLOB/fldstGRAPHIC	fldDBMEMO

fldPDXBLOB	fldPDXMEMO	fldDBMEMO

fldPDXLONG	fldINT32	fldDBNUM {11.0}

fldPDXTIME	fldTIME	fldDBCHAR {>8}

fldPDXDATETIME	fldTIMESTAMP	fldDBCHAR {30}

fldPDXBOOL	fldBOOL	fldDBBOOL

fldPDXAUTOINC	fldINT32	fldDBNUM {11.0}

fldPDXBYTES	fldBYTES	fldDBBYTES

fldPDXBCD	fldBCD	fldDBCHAR


From dBASE Physical Types

dBASE physical	BDE logical	Paradox physical

fldDBCHAR	fldZSTRING	fldPDXCHAR

fldDBNUM	if( iUnits2=0 && iUnits1<5 )	fldINT16 else fldFLOAT fldPDXSHORTfldPDXNUM

fldDBMEMO	fldBLOB	fldPDXMEMO

fldDBBOOL	fldBOOL	fldPDXBOOL

fldDBDATE	fldDATE	fldPDXDATE

fldDBFLOAT	fldFLOAT	fldPDXNUM

fldDBLOCK	fldLOCKINFO	fldPDXCHAR {24}

fldDBBINARY	fldBLOB/fldstTYPEDBINARY	fldPDXBINARYBLOB

fldDBOLEBLOB	fldBLOB/fldstDBSOLEOBJ	fldPDXOLEBLOB


From SQL Server Physical Types

SQL Server physical	BDE logical	Paradox physical	dBASE physical

fldSYBCHAR	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldSYBVARCHAR	fldZSTRING	fldPDXCHAR	fldDBCHAR

fldSYBINT	fldINT32	fldPDXLONG	fldDBNUM {11.0}

fldSYBSMALLINT	fldINT16	fldPDXSHORT	fldDBNUM {6.0}

fldSYBTINYINT	fldINT16	fldPDXSHORT	fldDBNUM {6.0}

fldSYBFLOAT	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldSYBMONEY	fldFLOAT/fldstMONEY	fldPDXMONEY	fldDBFLOAT {20.4}

fldSYBTEXT	fldBLOB/fldstMEMO	fldPDXMEMO	fldDBMEMO

fldSYBBINARY	fldVARBYTES	fldPDXBINARYBLOB	fldDBMEMO

fldSYBVARBINARY	fldVARBYTES	fldPDXBINARYBLOB	fldDBMEMO

fldSYBIMAGE	fldBLOB/fldstBINARY	fldPDXBINARYBLOB	fldDBMEMO

fldSYBBIT	fldBOOL	fldPDXBOOL	fldDBBOOL

fldSYBDATETIME	fldTIMESTAMP	fldPDXDATETIME	fldDBDATE

fldSYBTIMESTAMP	fldVARBYTES	fldPDXBINARYBLOB	fldDBMEMO

fldSYBFLOAT4	fldFLOAT	fldPDXNUM	fldDBFLOAT {20.4}

fldSYBMONEY4	fldFLOAT/fldstMONEY	fldPDXMONEY	fldDBFLOAT {20.4}

fldSYBDATETIME4	fldTIMESTAMP	fldPDXDATETIME	fldDBDATE


SQL Server System Tables

SQL Server includes a special set of system tables. System tables describe privileges, indexes, SQL table structures, and other items that define relationships within a database.

Here is a list of SQL Server system tables you can access through SQL Link.

Table name	Use

syscolumns	Lists each column in a table or view

sysdepends	Lists each procedure, view, or table referenced by a procedure, view, or trigger

sysindexes	Lists each clustered index, nonclustered index, and table with no index

syslogins	Lists each valid user account

sysobjects	Lists each object for the database

sysprotects	Lists user permission information

sysusers	Lists each user and group for the database


SQL Server Field-naming Rules

Here is a list of field-naming rules for Paradox, dBASE, and SQL Server.

Naming rule	Paradox	dBASE	SQL Server

Max length (characters)	25	10	30

Valid characters	All	All alphanumeric except 	All except spaces and hyphen (-)
punctuation marks,
blank spaces, and other
special characters

Must begin with . . .	Any valid character
except space	A letter	A letter

Note:	You may not use SQL Server reserved words for remote table and column names. See the SQL Server Programmer's Reference for a list of reserved words.