Copyright: Copyright (C) 1996 Lotus Development Corporation


INTERSOLV copyright notice

Copyright 1995 INTERSOLV Inc. All rights reserved. INTERSOLV is a registered trademark, and DataDirect is a trademark of INTERSOLV, Inc. Other company or product names mentioned herein may be trademarks or registered trademarks of their respective companies.


Using the ODBC Drivers on Windows NT and Windows 95

On both Windows 95 and Windows NT systems, the ODBC drivers are 32-bit drivers.  All required network software supplied by your database system vendors must be 32-bit compliant.  Consult the “System Requirements” section for specific requirements for each relational database driver.

ODBC.INI

ODBC.INI is a subkey of the HKEY_CURRENT_USER\SOFTWARE\ODBC key in the Windows NT and Windows 95 registry. The ODBC.INI subkey is maintained by the ODBC Administrator, which is located in the Windows Control Panel.  Since Windows NT and Windows 95 can support multiple users, the ODBC.INI subkey is stored under unique user keys in the registry. See the OBDC.INI topic for more information.

Starting the ODBC Administrator

The section “Configuring Data Sources” in each driver topic instructs you to start the ODBC Administrator.  To start the ODBC Administrator, double-click the ODBC32 icon in the Control Panel.

Driver Names

On Windows NT and Windows 95, all ODBC drivers start with LO. The file extension for all ODBC drivers is .DLL. The number corresponds to the version level of the drivers. For example, the Oracle driver is LOOR709.DLL. See the driver list for filenames of specific drivers.

Disk Space and Memory Requirements

Disk space requirements are 6 MB of free space on the disk drive where Windows NT or Windows 95 is installed.

Memory requirements vary, depending on the database driver. If you are using a flat-file database driver, you need at least 8 MB of memory on Windows 95 or at least 16 MB of memory on Windows NT. If your system is hosting a relational database system, additional memory may be required. Consult your relational database documentation to determine the exact memory requirements.


ODBC Driver Reference

This help file is your online documentation for the INTERSOLV ODBC Drivers.

Note	The INGRES 6.4/04 driver is not supported for this release.

Click any of the following topics for information on that topic:

About INTERSOLV database drivers

Error messages

ODBC.INI

Supported ODBC Functions

Copyright


ODBC.INI examples

The following example shows an ODBC.INI file as defined by the ODBC specification:

;---------------------------------------------------

; ODBC.INI - INTERSOLV ODBC Driver Manager INI File

;---------------------------------------------------

[ODBC Data Sources]

ivss=SQL Server

ivdbf=dBASE

ivor7=Oracle

[ivss]

Driver=ivss08.dll

Description=INTERSOLV SQL Server driver

ServerName=alice

LogonID=test

[ivdbf]

Driver=ivdbf08.dll

Description=INTERSOLV dBASE driver

Database=C:\DBASE

[ivor7]

Driver=ivor708.dll

Description=INTERSOLV Oracle driver

ServerName=t:magna:V7

LogonID=test


About INTERSOLV database drivers

The INTERSOLV ODBC drivers are compliant with the Microsoft Open Database Connectivity (ODBC) specification. ODBC is a specification for an application program interface (API) that enables applications to access multiple database management systems using Structured Query Language (SQL).

ODBC permits maximum interoperability--a single application can access many different database management systems. This enables an ODBC developer to develop, compile, and ship an application without targeting a specific type of data source. Users can then add the database drivers that link the application to the database management systems of their choice.

Copyright


Supported ODBC functions

This topic lists the ODBC API functions that the database drivers support

All database drivers are ODBC Level 1-compliant--they support all ODBC Core and Level 1 functions. A limited set of Level 2 functions is also supported. The drivers support the functions listed in the following table. Any additions to these supported functions or differences in the support of specific functions are listed in the "ODBC Conformance Level" topic for each individual driver.

Core Functions	Level 1 Functions
SQLAllocConnect SQLAllocEnv SQLAllocStmt SQLBindCol SQLBindParameter SQLCancel SQLColAttributes SQLConnect SQLDescribeCol SQLDisconnect SQLDrivers SQLError SQLExecDirect SQLExecute SQLFetch SQLFreeConnect SQLFreeEnv SQLFreeStmt SQLGetCursorName SQLNumResultCols SQLPrepare SQLRowCount SQLSetCursorName SQLTransact	SQLColumns SQLDriverConnect SQLGetConnectOption SQLGetData SQLGetFunctions SQLGetInfo SQLGetStmtOption SQLGetTypeInfo SQLParamData SQLPutData SQLSetConnectOption SQLSetStmtOption SQLSpecialColumns SQLStatistics SQLTables Level 2 Functions SQLDataSources SQLExtendedFetch (forward scrolling only) SQLMoreResults SQLNativeSql SQLNumParams SQLParamOptions SQLSetScrollOptions


ODBC.INI

On Windows NT and Windows 95, ODBC.INI is a subkey of the registry. The registry is a binary database that is maintained by Windows NT and Windows 95 and structured as a set of keys that partition information stored within.

The ODBC.INI is a subkey of the key HKEY_CURRENT_USER. The hierarchy is:

•	HKEY_CURRENT_USER

•	Software, ODBC, ODBC.INI

Discussion in this topic refers to the ODBC.INI level within the registry.

You maintain ODBC.INI subkey using the ODBC Administrator program, located in the Control Panel.

Since Windows NT and Windows 95 can host multiple users, each user has a distinct version of the HKEY_CURRENT_USER database, stored under a unique user key in the registry. Each user must run the ODBC Administrator to initialize and configure the data sources in the ODBC.INI subkey.

To start the ODBC Administrator, double-click the ODBC32 icon in the control panel.

During the primary installation of the ODBC Pack, another registry subkey, ODBCINST.INI, is initialized and configured. This subkey is stored in the key HKEY_LOCAL_MACHINE and holds the number and types of drivers installed at the machine level. This information is then used by the ODBC Administrator to determine which drivers are to be displayed during the user configuration of the ODBC.INI subkey.

You cannot put comments in ODBC.INI.

ODBC.INI structure

ODBC.INI contains a [section_name] heading that is followed by optional attribute=value pairs, called entries. Both the section name and the attributes are case-insensitive. Comment lines begin with a semicolon (;).

The ODBC.INI format, as specified by the Microsoft Open Database Connectivity (ODBC) specification, is as follows:

[ODBC Data Sources]	;Lists data sources available to ODBC
ds_name1=driver_desc1	;Lists each data source name followed   ;by a description
ds_name2=driver_desc2
. . .
[ds_name1]	;Defines the actual ODBC Driver source ;for example, Oracle.
Driver=path/dll	;Defines the path to the driver DLL.
Description=desc	;Briefly describes the data source
. . .
[ds_name2]
Driver=path/dll
Description=desc
The [ODBC Data Sources] section is mandatory. It provides the driver manager with a list of data sources that are supported for your connection requests. You can change the names in this list, but each entry must match its corresponding [ds_name] section in ODBC.INI.

The [ds_name] sections contain a Driver= specification, which points to the location of the installed driver, as well as a Description= specification that describes the driver. If you change the location of a driver, you can change the Driver= specification to match the new location. You can also use just the name of the driver, and the driver manager will attempt to locate the driver based on information obtained from your environment.

You might need to assign other entries depending on the data source you are configuring. A topic called "Connecting to a data source using a connection string" for each individual driver lists the attributes that you can set. Use the ODBC Administrator program to modify ODBC.INI in all environments that provide this interface. This protects the ODBC.INI from becoming corrupted or nonfunctional.


Error messages

Error messages may come from:

•	An ODBC driver

•	The database system

•	The driver manager

ODBC driver errors

An error reported on an ODBC driver has the following format:

[vendor] [ODBC_component] message

ODBC_component is the component in which the error occurred. For example, an error message from INTERSOLV's SQL Server driver would look like this:

[INTERSOLV] [ODBC SQL Server driver] Login incorrect.

If you get this type of error, check the last ODBC call your application made for possible problems or contact your ODBC application vendor.

Database system errors

An error that occurs in the data source includes the data source name, in the following format:

[vendor] [ODBC_component] [data_source] message

With this type of message, ODBC_component is the component that received the error from the data source indicated. For example, you may get the following message from an Oracle data source:

[INTERSOLV] [ODBC Oracle driver] [Oracle] ORA-0919:  specified length too long for CHAR column

If you get this type of error, you did something incorrectly with the database system. Check your database system documentation for more information or consult your database administrator. In this example, you would check your Oracle documentation.

Driver manager errors

The Driver Manager is a DLL that establishes connections with drivers, submits requests to drivers, and returns results to applications. An error that occurs in the driver manager has the following format:

[vendor] [ODBC DLL] message

Vendor can be Microsoft, Apple, or INTERSOLV. For example, an error from the Microsoft driver manager might look like this:

[Microsoft] [ODBC Driver Manager] Driver does not support this function

If you get this type of error, consult the Programmer's Reference for the Microsoft ODBC Software Development Kit available from Microsoft.