Progress ODBC Driver Guide
Progress ODBC Driver Guide
Progress ODBC Driver Guide
Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation.
This manual is also copyrighted and all rights are reserved. This manual may not, in whole or in part, be
copied, photocopied, translated, or reduced to any electronic medium or machine-readable form without
prior consent, in writing, from Progress Software Corporation.
The information in this manual is subject to change without notice, and Progress Software Corporation
assumes no responsibility for any errors that may appear in this document.
The references in this manual to specific platforms supported are subject to change.
Progress, Progress Results, Provision and WebSpeed are registered trademarks of Progress Software
Corporation in the United States and other countries. Apptivity, AppServer, ProVision Plus, SmartObjects,
IntelliStream, and other Progress product names are trademarks of Progress Software Corporation.
SonicMQ is a trademark of Sonic Software Corporation in the United States and other countries.
Progress Software Corporation acknowledges the use of Raster Imaging Technology copyrighted by
Snowbound Software 1993-1997 and the IBM XML Parser for Java Edition.
©
IBM Corporation 1998-1999. All rights reserved. U.S. Government Users Restricted Rights — Use,
duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Progress is a registered trademark of Progress Software Corporation and is used by IBM Corporation in the
mark Progress/400 under license. Progress/400 AND 400® are trademarks of IBM Corporation and are used
by Progress Software Corporation under license.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the
United States and other countries.
Any other trademarks and/or service marks contained herein are the property of their respective owners.
.
May 2001
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Organization of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
How to Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
Syntax Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Other Useful Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
DataServers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
SQL-92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
SQL-92 Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
ODBC Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1
1.1 Overview of ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
1.1.1 The Progress SQL-92 ODBC Driver . . . . . . . . . . . . . . . . . . . . 1–2
1.1.2 ODBC Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3
A. SQLGetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–1
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Glossary–1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index–1
iv
Contents
Figures
Figure 1–1: Components of a Progress ODBC Environment . . . . . . . . . . . . . . . . . 1–4
v
Contents
Tables
Table 2–1: Connection String Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10
Table 3–1: Scalar String Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5
Table 3–2: Scalar Numeric Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7
Table 3–3: Scalar Time and Date Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–10
Table 3–4: Scalar System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–12
Table 4–1: ODBC Driver File Location by Platform . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Table 4–2: ODBC Driver Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Table 4–3: System Information File Entries by Platform . . . . . . . . . . . . . . . . . . . . . 4–4
Table 4–4: Runtime System Shared Library Path Settings . . . . . . . . . . . . . . . . . . . 4–5
Table 4–5: Translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
Table A–1: Information the Progress SQL-92 ODBC Driver Returns
to SQLGetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A–2
Table B–1: Progress and ODBC Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B–2
vi
Preface
Purpose
This manual describes how to configure the Progress SQL-92 ODBC driver to provide access
to the Progress database from desktop tools and applications that support the ODBC (Open
Database Connectivity) interface. This manual also provides details about the information
returned to your application by the driver. The Progress SQL-92 ODBC driver is supplied by
MERANT Inc. In this manual, the driver will be referred to generically as the Progress SQL-92
ODBC driver.
Audience
This book is designed as a guide for anyone who wants to use the Progress SQL-92 ODBC
driver to access a Progress Version 9 database.
Introduces the Progress SQL-92 ODBC driver and describes how it works.
Describes how to add and modify, Progress data sources that use the Progress SQL-92
ODBC driver on Windows.
This chapter lists the ODBC API functions that the Progress SQL-92 ODBC driver
supports. It also lists the scalar functions used in SQL-92 statements
Progress ODBC Driver Guide
This chapter describes how to configure the Progress SQL-92 ODBC Driver in the UNIX
environment.
Appendix A, “SQLGetInfo”
This appendix shows information the Progress SQL-92 ODBC driver Returns to
SQLGetInfo.
This appendix shows how the Progress data types are mapped to the standard ODBC data
types.
“Glossary”
Index
Typographical Conventions
This manual uses the following typographical conventions:
– New terms
viii
Preface
– Code examples
– System output
• Small capitals are used for Progress key functions and generic keyboard keys.
END-ERROR, GET, GO
ALT, CTRL, SPACEBAR, TAB
• When you have to press a combination of keys, they are joined by a dash. You press and
hold down the first key, then press the second key.
CTRL-X
• When you have to press and release one key, then press another key, the key names are
separated with a space.
ESCAPE H
ESCAPE CURSOR-LEFT
Syntax Notation
The syntax for each SQL-92 component follows a set of conventions:
• Uppercase words are keywords. Although they are always shown in uppercase, you can
use either uppercase or lowercase when using them in an expression or a statement.
SYNTAX
• Italics identify options or arguments that you must supply. These options can be defined
as part of the syntax or in a separate syntax identified by the name in italics. In the GRANT
statement you must supply at least one user_name.
• Square brackets ([ ] ) around an item indicate that the item, or a choice of one of the
enclosed items, is optional.
ix
Progress ODBC Driver Guide
In this syntax example the first user_name is required, and additional user_name
specifications are optional:
SYNTAX
• Braces ({ }) around an item indicate that the item, or a choice of one of the enclosed
items, is required.
In the GRANT example, you must specify either RESOURCE or DBA or both, and at least
one user_name. Any user_name specifications after the first are optional:
SYNTAX
In some cases, braces are not a syntax notation, but part of the language.
For example, this excerpt from an ODBC application invokes a stored procedure using the
ODBC syntax { call procedure_name ( param ) }, where braces and parentheses are part
of the language:
SYNTAX
• A vertical bar (|) indicates a choice. In the CREATE SYNONYM example you must
specify a table_name, view_name, or synonym but you can only choose one. Note that in
all SQL-92 syntax, if you specify the optional owner_name qualifier, there must not be a
blank between the period separator and the table_name or view_name or synonym:
SYNTAX
x
Preface
In the DELETE FROM example, you must specify one of table_name or view_name:
SYNTAX
• Ellipses (...) indicate that you can choose one or more of the preceding items. If a group
of items is enclosed in braces and followed by ellipses, you must choose one or more of
those items. If a group of items is enclosed in brackets and followed by ellipses, you can
optionally choose one or more of those items.
In the ORDER BY example, you must include one expression (expr) or column position
(posn), and you can optionally specify the sort order as ascending (ASC) or descending
(DESC). You can specify additional expressions or column positions for sorting within a
sorted result set. The SQL-92 engine orders the rows on the basis of the first expr or posn.
If the values are the same, the second expr or posn is used in the ordering:
SYNTAX
In the GRANT example, you must include one user_name, but you can optionally include
more. Note that each subsequent user_name must be preceded by a comma:
SYNTAX
• In many examples, the syntax is too long to place in one horizontal row. In such cases,
optional items appear individually bracketed in multiple rows in order, left-to-right and
top-to-bottom. This order generally applies, unless otherwise specified. Required items
also appear on multiple rows in the required order, left-to-right and top-to-bottom. In cases
where grouping and order might otherwise be ambiguous, braced (required) or bracketed
(optional) groups clarify the groupings.
xi
Progress ODBC Driver Guide
SYNTAX
Getting Started
Progress Electronic Documentation Installation and Configuration Guide (Hard copy only)
A booklet that describes how to install the Progress EDOC viewer and collection on UNIX
and Windows.
A manual that describes how to install and set up Progress Version 9.1 for the UNIX
operating system.
A manual that describes how to install and set up Progress Version 9.1 for all supported
Windows and Citrix MetaFrame operating systems.
A guide that provides a brief description of each new feature of the release. The booklet
also explains where to find more detailed information in the documentation set about each
new feature.
Progress Master Glossary for Windows and Progress Master Glossary for Character (EDOC
only)
Platform-specific master glossaries for the Progress documentation set. These books are
in electronic format only.
xii
Preface
Progress Master Index and Glossary for Windows and Progress Master Index and Glossary for
Character (Hard copy only)
Platform-specific master indexes and glossaries for the Progress hard-copy documentation
set.
A reference manual that describes the Progress startup commands and parameters in
alphabetical order.
A booklet that explains how Progress software and media are packaged. An icon-based
map groups the documentation by functionality, providing an overall view of the
documentation set. Welcome to Progress also provides descriptions of the various services
Progress Software Corporation offers.
4GL
Progress Internationalization Guide
A guide to developing Progress applications for markets worldwide. The guide covers
both internationalization—writing an application so that it adapts readily to different
locales (languages, cultures, or regions)—and localization—adapting an application to
different locales.
Database
Progress Database Design Guide
A guide that uses a sample database and the Progress Data Dictionary to illustrate the
fundamental principles of relational database design. Topics include relationships,
normalization, indexing, and database triggers.
This guide describes Progress database administration concepts and procedures. The
procedures allow you to create and maintain your Progress databases and manage their
performance.
xiii
Progress ODBC Driver Guide
DataServers
Progress DataServer Guides
These guides describe how to use the DataServers to access non-Progress databases. They
provide instructions for building the DataServer modules, a discussion of programming
considerations, and a tutorial. Each DataServer has its own guide, such as: the Progress
DataServer for Microsoft SQL Server Guide, the Progress DataServer for ODBC Guide, the
Progress DataServer for ORACLE Guide, or the Progress/400 Product Guide
SQL-92
Progress Embedded SQL-92 Guide and Reference
A guide to the Java Database Connectivity (JDBC) interface and the Progress SQL-92
JDBC driver. It describes how to set up and use the driver and details the driver’s support
for the JDBC interface.
A user guide and reference for programmers who use Progress SQL-92. It includes
information on all supported SQL-92 statements, SQL-92 Data Manipulation Language
components, SQL-92 Data Definition Language components, and Progress functions. The
guide describes how to use the Progress SQL-92 Java classes and how to create and use
Java stored procedures and triggers.
SQL-92 Reference
(These are non-Progress resources available from your technical bookseller.)
A Guide to the SQL Standard
Date, C.J., with Hugh Darwen. 1997. Reading, MA: Addison Wesley.
Melton, Jim (Digital Equipment Corporation) and Alan R. Simon. 1993. San Francisco:
Morgan Kaufmann Publishers.
xiv
Preface
ODBC Reference
Microsoft ODBC 3.0 Programmer’s Reference
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington, 1997
xv
Progress ODBC Driver Guide
xvi
1
Introduction
The Progress SQL-92 ODBC (Open Database Connectivity) Driver is supplied by MERANT
Inc., formerly known as Intersolv. In this manual, the driver will be referred to generically as
the Progress SQL-92 ODBC driver. It runs on Windows, Window NT, and UNIX
environments. It is installed when you install the Progress SQL-92 Client Access product.
This chapter provides a brief overview of the ODBC interface, and describes how the Progress
SQL-92 ODBC driver provides access from a wealth of desktop tools to the Progress database.
Progress ODBC Driver Guide
• ODBC, Microsoft’s Open Data Base Connectivity has become the de facto database
access standard on the desktop.
• Desktop tools and applications that support ODBC can access any data source supported
by an ODBC driver. These tools include client/server development, query, and personal
productivity tools.
To become accessible from ODBC client applications, database environments must provide
software, called an ODBC driver, on the client system where the application resides. The driver
translates the standard ODBC function calls into calls the data source can process, and returns
data to the application. Each data source provides a driver on the client system for applications
to use to access data from that source.
• A library of function calls that allow applications to connect with a database system and
issue statements through an application programming interface (API)
• Syntax for Structured Query Language (SQL) statements, based on existing standards
1–2
Introduction
Application
An ODBC application is any program that calls ODBC functions and uses them to issue SQL
statements. Many vendors have added ODBC support to their existing Windows-based tools so
those tools can use ODBC for data access.
ODBC Driver
An ODBC driver is a dynamic link library (DLL) or a shared library that processes ODBC
function calls for a specific data source. The driver connects to the data source, translates the
standard SQL statements into syntax the data source can process, and returns data to the
application. There are ODBC drivers for every major database system.
Data Source
A data source is a combination of a database system, the operating system it uses, and any
network software required to access it. ODBC defines a database system (DBMS) as any
vendor’s implementation of a data access system that provides an SQL interface.
1–3
Progress ODBC Driver Guide
Progress SQL-92
ODBC Driver
Progress
Database
1–4
2
Configuring Progress Data Sources
This chapter describes how to use the ODBC Administrator Utility to add and modify Progress
SQL-92 ODBC data sources on Windows client systems. For information on configuring UNIX
client systems, see Chapter 4, “The UNIX Environment.”
Progress ODBC Driver Guide
1 ♦ Choose Settings→ Control Panel from the Windows Start menu. The Control Panel
displays.
3 ♦ The ODBC Administrator displays the ODBC Data Source Administrator dialog box:
2–2
Configuring Progress Data Sources
4 ♦ Click Add to display a list of installed drivers. The Create New Data Source dialog box
appears:
5 ♦ Highlight the MERANT 3.60 32-BIT Progress SQL-92 ODBC driver, then click Finish
to display the ODBC Progress SQL-92 Driver Setup dialog box.
Description
An optional long description of the data source name. For example, “My Accounting
Database” or “Progress 9.1 local newsports.”
Host Name
The name of the system where the database or database broker is located.
Port Number
The system port number setup for the database listener process.
2–3
Progress ODBC Driver Guide
Database Name
User ID
The default logon ID (user name) used to connect to your Progress database. Your
ODBC application may override this value or you may override it in the Logon
dialog box or connection string:
2–4
Configuring Progress Data Sources
Specifies the default isolation level for concurrent transactions. Choose from the
following values: READ COMMITTED, READ UNCOMMITTED,
REPEATABLE READ, and SERIALIZABLE. REPEATABLE READ is the
default. See the Progress SQL-92 Guide and Reference for an explanation of the SET
TRANSACTION ISOLATION LEVEL command.
The number of rows the driver retrieves when fetching from the server. This is not
the number of rows given to the user. The default is 50.
9 ♦ Click Test Connect to attempt to connect to the data source using the connection
properties specified in the Driver Setup dialog box.
10 ♦ If the driver can connect, it releases the connection and displays a connection established
message. Click OK:
11 ♦ The ODBC Progress SQL92 Driver Setup dialog box appears. Click Apply:
2–5
Progress ODBC Driver Guide
12 ♦ Click OK or Cancel to close the Driver Setup dialog box. If you click OK, the values you
have specified become the defaults when you connect to the data source. You can change
these defaults by using this procedure to reconfigure your data source. You can override
these defaults by connecting to the data source using a connection string with alternative
values. The data source appears in the ODBC Data Source Administrator:
2–6
Configuring Progress Data Sources
1 ♦ Choose Settings→ Control Panel from the Windows Start menu. The Control panel
displays:
2 ♦ Double click the ODBC icon in the Control Panel. The ODBC Administrator displays the
ODBC Data Source Administrator dialog box:
3 ♦ Highlight the User Data Source Name you wish to modify and click Configure. The
ODBC Progress SQL-92 Driver Setup dialog box appears.
2–7
Progress ODBC Driver Guide
5 ♦ Click Apply.
6 ♦ Click OK.
You must verify that the all required client software is properly installed before you can
proceed. Refer to the Progress Installation and Configuration Guide Version 9 for Windows for
more information.
2–8
Configuring Progress Data Sources
2 ♦ Type the Port Number setup for the database listener process.
5 ♦ If required, type your password. Password is an optional parameters. You can log on to
the database without this parameter, but you may not be able to create, delete, or
manipulate the data.
2–9
Progress ODBC Driver Guide
DSN=data_source_name[;attribute=value[;attribute=value]...]
DSN=PROGRESS;DB=PAYROLL;UID=JOHN;PWD=XYZZY;HOST=LOCALHOST;
PORT=2055
Table 2–1 gives the long and short names for each attribute, as well as a description.
The defaults listed in the table are initial defaults that apply when no value is specified in either
the connection string or in the data source definition in the system information. If you specified
a value for the attribute when configuring the data source, that value is the default.
Attribute Description
2–10
Configuring Progress Data Sources
Attribute Description
2–11
Progress ODBC Driver Guide
2–12
3
ODBC API and Scalar Functions
This chapter lists the ODBC API functions that the Progress SQL-92 ODBC driver supports and
the scalar functions, which you use in SQL-92 statements.
Progress ODBC Driver Guide
3–2
ODBC API and Scalar Functions
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLGetDiagField
SQLGetDiagRec
SQLGetEnvAttr
SQLGetFunctions
SQLGetInfo
SQLGetStmtAttr
SQLGetTypeInfo
SQLMoreResults
SQLNativeSql
SQLNumParams
SQLNumResultCols
SQLParamData
SQLPrepare
SQLPutData
NOTE: The MERANT Progress SQL-92 ODBC Driver has an internal limitation of 2 Mg
when a user specifies the placement of data through the SQLPutData call.
SQLRowCount
SQLSetConnectAttr
SQLSetCursorname
SQLSetDescField
SQLSetDescRec
SQLSetEnvAttr
SQLSetStmtAttr
SQLSetPos
SQLSpecialColumns
3–3
Progress ODBC Driver Guide
SQLStatistics
SQLTables
SQLTransact
SYNTAX
{fn scalar-function}
where scalar-function is one of the functions listed in the following tables. For example:
• string_exp can be the name of a column, a string literal, or the result of another scalar
function, where the underlying data type is SQL_CHAR or SQL_VARCHAR.
• start, length, and count can be the result of another scalar function or a literal numeric
value, where the underlying data type is SQL_TINYINT, SQL_SMALLINT, or
SQL_INTEGER.
The string functions are one-based; that is, the first character in the string is character 1.
Character string literals must be surrounded in single quotation marks.
3–4
ODBC API and Scalar Functions
Function Returns
3–5
Progress ODBC Driver Guide
Function Returns
3–6
ODBC API and Scalar Functions
Function Returns
• numeric_exp can be a column name, a numeric literal, or the result of another scalar
function, where the underlying data type is SQL_NUMERIC, SQL_DECIMAL,
SQL_TINYINT, SQL_SMALLINT, SQL_INTEGER, SQL_FLOAT, SQL_REAL, or
SQL_DOUBLE.
• float_exp can be a column name, a numeric literal, or the result of another scalar
function, where the underlying data type is SQL_FLOAT.
• integer_exp can be a column name, a numeric literal, or the result of another scalar
function, where the underlying data type is SQL_TINYINT, SQL_SMALLINT, or
SQL_INTEGER.
Function Returns
3–7
Progress ODBC Driver Guide
Function Returns
3–8
ODBC API and Scalar Functions
Function Returns
• date-exp can be a column name, a date or timestamp literal, or the result of another scalar
function, where the underlying data type can be represented as SQL_CHAR,
SQL_VARCHAR, SQL_DATE, or SQL_TIMESTAMP.
• time_exp can be a column name, a timestamp or timestamp literal, or the result of another
scalar function, where the underlying data type can be represented as SQL_CHAR,
SQL_VARCHAR, SQL_TIME, or SQL_TIMESTAMP.
• timestamp_exp can be a column name; a time, date, or timestamp literal; or the result of
another scalar function, where the underlying data type can be represented as
SQL_CHAR, SQL_VARCHAR, SQL_TIME, SQL_DATE, or SQL_TIMESTAMP.
3–9
Progress ODBC Driver Guide
Function Returns
3–10
ODBC API and Scalar Functions
Function Returns
SQL_TSI_FRAC_SECOND
SQL_TSI_SECOND
SQL_TSI_MINUTE
SQL_TSI_HOUR
SQL_TSI_DAY
SQL_TSI_WEEK
SQL_TSI_MONTH
SQL_TSI_QUARTER
SQL_TSI_YEAR
Fractional seconds are expressed in
billionths of a second.
3–11
Progress ODBC Driver Guide
Function Returns
3–12
4
The UNIX Environment
This chapter describes how to configure the Progress SQL-92 ODBC Driver in the UNIX
environment.
Progress ODBC Driver Guide
NOTE: $DLC is an environment variable that points to the directory in which Progress is
installed. Using $DLC allows you to use the same script to set environment variables
relative to where Progress is installed, regardless of where it is installed on a
particular system.
To configure the driver you must set the appropriate environment variables and configure your
data source. The following sections contain instructions for completing these tasks.
4–2
The UNIX Environment
[results]
Driver=/dlc/odbc/lib/pgproxx.so
DatabaseName=testdb
PortNumber=sqlservicename
HostName=myserverhost
LogonID=mylogin
Password=xxx
APILevel=1
ConnectFunctions=YYN
CPTimeout=60
DriverODBCVer=03.60
FileUsage=0
SQLLevel=0
UsageCount=1
ArraySize=50
DefaultIsolationLevel=REPEATABLE READ
LogonID=ccall
StaticCursorLongColBuffLen=4096
[ODBC]
InstallDir=/dlc/odbc
Trace=0
TraceFile=odbctrace.out
TraceDll=/dlc/odbc/lib/odbctrac.so
UseCursorLib=0
4–3
Progress ODBC Driver Guide
The library file names in the system information file vary by platform. Table 4–3 lists the Driver
and Tracing library names by platform.
ODBCINI=/dlc/odbc/system_odbc.ini;export ODBCINI
ODBCINI is an environment variable that the Progress SQL-92 ODBC driver will recognize.
You can set ODBCINI to use a system information file other than the default file. You can have
multiple system information files and change the ODBCINI environment variable to point to
the one you want to use.
The search order for the location of the system information file is as follows:
1. Check ODBCINI
4–4
The UNIX Environment
There must be an [ODBC] section in the system information file that includes the InstallDir
keyword. The value of this keyword must be the path to the directory under which the /lib and
/messages directories are contained. For example, if you choose the default install directory,
then the following line must be in the [ODBC] section:
InstallDir=/dlc/odbc
Solaris LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DLC/od
bc/lib
$ DLC/bin/proenv
. $DLC/bin/slibod_env
4–5
Progress ODBC Driver Guide
1 ♦ Add the following line at the very beginning of applications that use double-byte character
sets:
This is a standard UNIX function. It selects the character set indicated by the environment
variable LANG as the one to be used by X/Open compliant character handling functions.
If this line is not present, or if LANG is either not set or is set to NULL, the default locale
"C" is used.
2 ♦ Set the LANG environment variable to the appropriate character set. The UNIX command
locale -a can be used to display all supported character sets on your system.
For more information, see the man pages for “locale” and “setlocale.”
4.4 Translators
Progress provides a sample translator named “OEM to ANSI” that provides a framework for
coding a translation library.
Table 4–5 lists the Translation keyword options. You must add the TranslationSharedLibrary
keyword to the data source section of the system information file to perform a translation.
Adding the TranslationOption keyword is optional.
Keyword Definition
4–6
A
SQLGetInfo
This appendix shows information the Progress SQL-92 ODBC Driver returns to SQLGetInfo.
Progress ODBC Driver Guide
Table A–1 describes return values to SQLGetInfo from the Progress SQL-92 ODBC driver.
A–2
SQLGetInfo
A–3
Progress ODBC Driver Guide
A–4
SQLGetInfo
A–5
Progress ODBC Driver Guide
A–6
SQLGetInfo
A–7
Progress ODBC Driver Guide
A–8
SQLGetInfo
A–9
Progress ODBC Driver Guide
A–10
SQLGetInfo
A–11
Progress ODBC Driver Guide
A–12
SQLGetInfo
A–13
Progress ODBC Driver Guide
A–14
SQLGetInfo
A–15
Progress ODBC Driver Guide
A–16
SQLGetInfo
A–17
Progress ODBC Driver Guide
A–18
SQLGetInfo
Referential SQL_ODBC_SQL_OPT_IEF Y
integrity syntax
support
A–19
Progress ODBC Driver Guide
A–20
SQLGetInfo
A–21
Progress ODBC Driver Guide
A–22
SQLGetInfo
A–23
Progress ODBC Driver Guide
A–24
SQLGetInfo
A–25
Progress ODBC Driver Guide
A–26
SQLGetInfo
A–27
Progress ODBC Driver Guide
A–28
B
Progress and ODBC Data Types
This appendix shows how the Progress data types are mapped to the standard ODBC data types.
Progress ODBC Driver Guide
Table B–1 shows how the Progress data types are mapped to the standard ODBC data types.
Binary SQL_BINARY
Bit SQL_BIT
Char SQL_CHAR
Date SQL_TYPE_DATE
Decimal SQL_DECIMAL
Float SQL_FLOAT
Integer SQL_INTEGER
Real SQL_FLOAT
Smallint SQL_SMALLINT
Time SQL_TYPE_TIME
Timestamp SQL_TYPE_TIMESTAMP
Tinyint SQL_TINYINT
Varbinary SQL_VARBINARY
Lvarbinary SQL_LONGVARBINARY
Varchar SQL_VARCHAR
B–2
Glossary
Add [an ODBC data source]
Make a data source available to ODBC through the Add operation of the ODBC
Administrator. Adding a data source tells ODBC where a specific database resides and
which ODBC driver to use to access it. Adding a data source also invokes a setup dialog
box for the particular driver so you can provide other details the driver needs to connect to
the database.
Client
In client/server systems, the part of the system that sends requests to servers and processes
the results of those requests.
Data Source
See ODBC Data Source.
Delete [an ODBC data source]
Removes information about an ODBC data source through the Delete operation of the
ODBC Administrator utility. Deleting a data source does not delete the database it
corresponds to, but removes information about the database’s location from the
\%WINDIR%\ODBC.INI file.
Delimited Identifiers
Names in SQL statements that are enclosed in double quotation marks ("). Enclosing a
name in double quotation marks preserves the case of the name and allows it to include
reserved words and special characters. Subsequent references to a delimited identifier
must also use enclosing double quotation marks.
ODBC Administrator
Microsoft-supplied utility to add and delete ODBC data sources and drivers. The
installation procedure installs the Administrator if it is not already present on a system. To
invoke it, click on the ODBC icon in the Control Panel applications of the Windows
Program Manager.
Progress ODBC Driver Guide
ODBC Application
Any program that calls ODBC functions and uses them to issue SQL statements. Many
vendors have added ODBC capabilities to their existing Windows-based tools.
ODBC Data Source
In ODBC terminology, a specific combination of a database system, the operating system
it uses, and any network software required to access it. Before applications can access a
database through ODBC, you use the ODBC Administrator to add a data source—register
information about the database and an ODBC driver that can connect to it—for that
database. More than one data source name can refer to the same database, and deleting a
data source does not delete the associated database.
ODBC Driver
Software that processes ODBC function calls for a specific data source. The driver
connects to the data source, translates the standard SQL statements into syntax the data
source can process, and returns data to the application.
ODBC Driver Manager
A Microsoft-supplied program that routes calls from an application to the appropriate
ODBC driver for a data source.
SQL Engine
The core internal component of Progress SQL-92. The SQL engine receives requests
from the Progress SQL-92 ODBC driver, processes them, and returns results.
Glossary–2
Index
A Data Types
how progress maps B–2
Audience vii ODBC B–2
standard B–2
B DLC/lib 4–5
Driver
Bold typeface
ODBC 1–3
as typographical convention viii
Driver Manager
ODBC 1–3, 2–2
C
Connecting E
connection string attributes 2–10
using a connection string 2–10 environment variables
using a logon dialog box 2–9 LD_LIBRARY_PATH 4–2
LIBPATH 4–2
Connection String Attibutes 2–10
PATH 4–2
SHLIB_PATH 4–2
D
F
Data Source
adding 2–2 Failure
configuring 2–2 test connect 2–8
definition 1–3
modifying 2–7 Functions
API 3–2
Data Source Name 2–3 date 3–9
numeric 3–7
ODBC API 3–1
Progress ODBC Driver Guide
O
I
ODBC
Italic typeface API functions 3–1
as typographical convention viii application 1–3
architecture 1–3
components 1–4
K data source 1–3
driver 1–3
Keystrokes ix driver manager 1–3, 2–2
environment 1–4
interface 1–2
L Open Database Connectivity 1–1
overview 1–2
LD_LIBRARY_PATH 4–2
ODBC Administrator 2–2, 2–7
Levels Create New Data Source dialog box 2–3
isolation 2–11 Data Source dialog box 2–2, 2–7
lock 2–11 Driver Setup dialog box 2–3, 2–7
ODBC Conformance 2–11
ODBC Driver 4–2
libodbc.a 4–2, 4–4 libodbc.a 4–2, 4–4
libodbc.sl 4–2, 4–4
libodbc.sl 4–2, 4–4
libodbc.so 4–2, 4–4
libodbc.so 4–2, 4–4 odbctrac.a 4–4
odbctrac.sl 4–4
LIBPATH 4–2 odbctrac.so 4–4
odbctrac.so 4–4
Index–2
Index
P connections 2–11
isolation levels 2–11
Problems lock levels 2–11
test connect failure 2–8 statements 2–11
Syntax notation ix
S
SHLIB_PATH 4–2
T
SQLGetInfo A–1 Test Connect
information returned A–2 to A–28 failure 2–8
Index–3
Progress ODBC Driver Guide
Index–4