UniVerse ODBC Guide

176
UniVerse ODBC Guide Part No. 70-9038-952

Transcript of UniVerse ODBC Guide

Page 1: UniVerse ODBC Guide

UniVerse

ODBC Guide

Part No. 70-9038-952

Page 2: UniVerse ODBC Guide

NOTICEArdent Software, Inc., makes no warranty of any kind with regard to the materialcontained in this manual, including but not limited to the implied warranties ofmerchantability and fitness for a particular purpose.

The information contained in this manual is subject to change without notice.

This manual contains proprietary information that is protected by copyright. Allrights are reserved. It may not be photocopied, reproduced, or translated, in wholeor in part, without the prior express written consent of Ardent Software, Inc.

Copyright 1996–2000 Ardent Software, Inc. All rights reserved.

TrademarksUniVerse is a registered trademark of Ardent Software, Inc. Uni Call Interface,UniVerse Data Replication, UniVerse NLS, UniVerse ODBC, UniObjects, UV/Net,UV/Term, and Ardent are trademarks of Ardent Software, Inc.

Microsoft, Windows, and Windows NT are registered trademarks of MicrosoftCorporation. Open Database Connectivity is a trademark of MicrosoftCorporation.

UNIX is a registered trademark in the United States and other countries, licensedexclusively through X/Open Company, Ltd.

All other company or product names mentioned are trademarks or registeredtrademarks of their respective trademark holders.

Printing HistoryFirst Printing (70-9038-952) for Release 3.7, February 2000

How to Order Technical DocumentsTo order copies of documents or to obtain a catalog and price list, contact your localArdent subsidiary or distributor, or call our main office at (508) 366-3888.

Customer CommentsWe welcome your input. Please comment on this manual using the customercomment form provided in the back of the manual.

This manual is printed on recycled paper.

Page 3: UniVerse ODBC Guide

Table of Contents iii

PrefaceOrganization of This Manual ...................................................................................... ixDocumentation Conventions ....................................................................................... xProduct Support ............................................................................................................ xiUniVerse Documentation ............................................................................................. xiRelated Documentation ..............................................................................................xiiiCommon APIs Documentation ................................................................................. xiv

Chapter 1. UniVerse ODBC Client/Server OverviewHow UniVerse ODBC Works ..................................................................................... 1-1

The UniVerse ODBC Server ................................................................................ 1-2The UniVerse ODBC Driver ............................................................................... 1-2UniVerse ODBC Client Applications ................................................................ 1-2Client/Server Interaction .................................................................................... 1-4

UniVerse ODBC Driver Conformance Levels ......................................................... 1-4ODBC API Conformance Levels ........................................................................ 1-5ODBC SQL Grammar Conformance Levels .................................................... 1-5

Universe ODBC Server and Client Compatibility .................................................. 1-6Tested ODBC Client Applications ..................................................................... 1-7

UniVerse ODBC Limitations ...................................................................................... 1-7Microsoft Access .................................................................................................. 1-7Microsoft Query ................................................................................................... 1-8File DSNs ............................................................................................................... 1-9Visual Basic ......................................................................................................... 1-10

Chapter 2. Getting StartedUniVerse ODBC Server Installation ......................................................................... 2-1

UniVerse ODBC GuideTable of Contents

Page 4: UniVerse ODBC Guide

iv UniVerse ODBC Guide

Configuring a UNIX System for UniVerse ODBC ..................................................2-1Checking UNIX System Resources and Properties .........................................2-1Modifying Users’ Shell Configuration Scripts .................................................2-2

Configuring UCI for UniVerse ODBC ......................................................................2-3Changing the MAXFETCHCOLS Parameter ...................................................2-4Changing the MAXFETCHBUFF Parameter ....................................................2-4Changing the UCI Connection Timeout ...........................................................2-5

Administering the UniVerse ODBC Server .............................................................2-5Authorizing the UniVerse ODBC Server ..........................................................2-5Making UniVerse Files Accessible to ODBC Clients .......................................2-5Removing ODBC Access to UniVerse Files ......................................................2-6UniVerse Server Administration Menu ............................................................2-7

Chapter 3. Installing and Configuring UniVerse ODBC ClientInstalling UniVerse ODBC Client Software .............................................................3-1

Verify the Client Configuration ..........................................................................3-1Install UniVerse ODBC Client ............................................................................3-2

Configuring UniVerse ODBC Client .........................................................................3-3Define a Data Source and a Configuration .......................................................3-3Distribute the Configuration File .....................................................................3-12

Removing the UniVerse ODBC Client Software ...................................................3-13Adding Additional UniVerse ODBC Clients .........................................................3-13Using UniVerse ODBC Config .................................................................................3-14

Using the UniVerse ODBC Config Window ...................................................3-14Using UniVerse ODBC Config Menu Commands .........................................3-16Editing and Testing Database Configurations ...............................................3-17

Merging Configuration Entries ...............................................................................3-23Sharing a Networked Configuration File ...............................................................3-24

Prerequisites ........................................................................................................3-24Sharing a Configuration File .............................................................................3-24

ODBC Diagnostic Tool: Dr. DeeBee Spy .................................................................3-25Monitoring Your Configuration .......................................................................3-25The Dr. DeeBee Spy Log File ............................................................................3-27

Page 5: UniVerse ODBC Guide

Table of Contents v

Chapter 4. Making UniVerse Data Accessible toODBC Applications

Overview ...................................................................................................................... 4-1Making UniVerse Accounts Accessible ............................................................ 4-1Making Data in a UniVerse Account Accessible ............................................. 4-2Presenting UniVerse Data in ODBC Format .................................................... 4-2

Accessing UniVerse Schemas and Accounts ........................................................... 4-3Using ODBC Qualifiers ....................................................................................... 4-4

Accessing UniVerse Tables, Views, and Files .......................................................... 4-5Updating a UniVerse Account for ODBC Access ............................................ 4-6File Privileges and Permissions ......................................................................... 4-6What the ODBC File Access Utility Does ......................................................... 4-7Accessing Saved Select Lists ............................................................................ 4-10

Accessing Columns and Fields ............................................................................... 4-11ODBC-Accessible Columns and Fields .......................................................... 4-11Multivalued Columns and Fields .................................................................... 4-11

Modifying UniVerse Data and Data Definitions for ODBC ................................ 4-14Validating Tables and Files for ODBC Clients ............................................... 4-14SQL Data Types .................................................................................................. 4-16Length of Character Data .................................................................................. 4-17Empty or Unconvertible Data .......................................................................... 4-18Conversion Codes .............................................................................................. 4-19

Association Keys ....................................................................................................... 4-19Defining Association Keys ............................................................................... 4-20

ODBC Name Mapping ............................................................................................. 4-20

Chapter 5. TroubleshootingIsolating a Problem ..................................................................................................... 5-1Before Reporting a Problem ...................................................................................... 5-2Getting Information About Your System ................................................................ 5-2Manual Communications Verification ..................................................................... 5-5

Verifying a TCP/IP Connection ......................................................................... 5-6Verifying Other Types of Network Connection ............................................... 5-6Connection Problems .......................................................................................... 5-7

Windows NT Server-Related Problems ................................................................... 5-7

Page 6: UniVerse ODBC Guide

vi UniVerse ODBC Guide

UNIX Server-Related Problems .................................................................................5-8Windows NT and UNIX Server-Related Problems ................................................5-8Client-Related Problems .............................................................................................5-9

Windows 3.1 Client-Related Problems ............................................................5-10

Appendix A. ODBC Usage NotesData Types in SQL ......................................................................................................A-1Support for Core ODBC SQL Grammar .................................................................A-2Support for Extended ODBC SQL Grammar .........................................................A-2

SELECT…FOR UPDATE Statement .................................................................A-3Outer Joins ............................................................................................................A-3UNION Clause ....................................................................................................A-4ESCAPE Clause in the LIKE Predicate .............................................................A-4Date and Time Types ..........................................................................................A-4Scalar Functions ...................................................................................................A-4

UniVerse Extensions to ODBC SQL Grammar .......................................................A-6NOWAIT Keyword .............................................................................................A-7EXPLAIN Keyword ............................................................................................A-8SQL Usage Notes and Restrictions ...................................................................A-8

Procedures ...................................................................................................................A-9Parameters ..........................................................................................................A-10Result Sets ...........................................................................................................A-10Behavior of SQLRowCount .............................................................................A-10Limitations .........................................................................................................A-11Interoperability with Generic ODBC Applications ......................................A-12

Executing UniVerse SQL .........................................................................................A-12The {NATIVE} Syntax Extension .....................................................................A-12Retrying Statements as UniVerse SQL ...........................................................A-13

SQL-Related Connection Options ..........................................................................A-14Transaction Support .................................................................................................A-14

Autocommit Mode ............................................................................................A-14Manual Mode .....................................................................................................A-14

ODBC Table Types ....................................................................................................A-15

Page 7: UniVerse ODBC Guide

Table of Contents vii

Appendix B. Error MessagesMessage Descriptions .................................................................................................B-1Messages .......................................................................................................................B-2

Appendix C. ODBC Environment Variables

Appendix D. Server Process Log FilesServer Process Log Filenames .................................................................................. D-1Saving and Examining the Server Process Logs .................................................... D-1Locating the Server Process Logs ............................................................................ D-2

UNIX ..................................................................................................................... D-2Windows NT ........................................................................................................ D-3

Appendix E. Sample AccountsLocating the Sample UniVerse Accounts .................................................................E-1Database Definitions ...................................................................................................E-1

HS.SALES Account ..............................................................................................E-2HS.SERVICE Account .........................................................................................E-2

Sample Data .................................................................................................................E-3

Appendix F. Character MappingCreating the Character Mapping File .......................................................................F-1Activating Character Mapping .................................................................................F-1Setting Up the Character Mapping File ...................................................................F-2

Entry Formats .......................................................................................................F-2Character Mapping Guidelines .........................................................................F-2

Index

Page 8: UniVerse ODBC Guide

viii UniVerse ODBC Guide

Page 9: UniVerse ODBC Guide

Preface ix

Preface

This guide describes how to install and configure a UniVerse ODBC server on amultiuser UniVerse host system. The server software is specific to UniVerse data-bases running on UNIX and Windows NT operating systems.

This guide also describes how to install, configure, and use the UniVerse ODBCdriver and the UniVerse ODBC Config configuration manager for ODBC clientsrunning on Windows 95, Windows 98, and Windows NT 4.0 systems.

UniVerse ODBC used to be called HyperStar. At Version 3.6, all HyperStar compo-nents were renamed as UniVerse ODBC components. UniVerse ODBC serverreplaces HyperStar FP server for UniVerse, UniVerse ODBC Config replacesSTAR/Config, and UniVerse ODBC driver replaces STAR/ODBC FP driver.

You should be familiar with your operating systems (UNIX, Windows 95,Windows 98, or Windows NT) and UniVerse, as well as with any networking soft-ware used on your client and server systems.

Organization of This ManualThis manual is organized as follows:

Chapter 1 provides an overview of the UniVerse ODBC server and client.

Chapter 2 describes system requirement for using UniVerse ODBC. It alsodescribes how to administer the UniVerse ODBC server for your system.

Chapter 3 describes how to install and configure UniVerse ODBC clientsoftware.

Chapter 4 describes how to make UniVerse data accessible to ODBCapplications.

Chapter 5 describes common system malfunctions and how to diagnose them.

Appendix A describes ODBC SQL usage.

Appendix B describes UniVerse ODBC error messages.

Appendix C describes the UniVerse ODBC environment variables.

Appendix D describes the server process log files.

Page 10: UniVerse ODBC Guide

x UniVerse ODBC Guide

Appendix E describes the sample UniVerse accounts created by the installa-tion script.

Appendix F describes character mapping in UniVerse ODBC.

Documentation ConventionsThis manual uses the following conventions:

The following are also used:

• Syntax definitions and examples are indented for ease in reading.

Convention Usage

Ctrl+Esc A plus sign between key names means to hold down thefirst key while you press the second key. For example,press Ctrl+Esc means to hold down the Ctrl key whileyou press the Esc key.

Alt, F A comma between key names means to press one keyafter the other. For example, Alt, F means to press andrelease the Alt key, then press and release the F key.

(Alt, F, E) Keystrokes in parentheses are the keyboard alternativesto the mouse.

➤ A right arrow between options indicates to choose eachoption in sequence. For example, choose File ➤ Exitmeans to choose File from the menu bar, then choose Exitfrom the pull-down menu.

UPPERCASE All uppercase characters other than keys indicate direc-tory names, filenames, and acronyms.

Bold In syntax, bold indicates commands, function names,keywords, and options that must be entered exactly asshown. In text, bold indicates keys to press, functionnames, and menu selections.

Italic In syntax, italic indicates information that you supply. Intext, italic also indicates UNIX commands and options,filenames, and pathnames.

Courier Courier indicates examples of source code and systemoutput.

Courier Bold In examples, courier bold indicates characters the usertypes or keys the user presses (for example, <Enter> ).

Page 11: UniVerse ODBC Guide

Preface xi

• All punctuation marks included in the syntax—for example, commas,parentheses, or quotation marks—are required unless otherwise indicated.

• Syntax lines that do not fit on one line in this manual are continued onsubsequent lines. The continuation lines are indented. When enteringsyntax, type the entire syntax entry, including the continuation lines, on thesame input line.

Product SupportIf you have questions about this product, first consult the documentation or onlinehelp. In some cases, such as for network or database errors, you may need toconsult additional documentation or your system administrator for furtherassistance.

If you are unable to resolve your question, ask your Ardent Customer Supportcontact.

When you write or call, make sure to provide the following information:

• The version number of the UniVerse ODBC driver or of UniVerse ODBCConfig.

• The version number of the UniVerse ODBC server you are using.

• For network- or database-related questions, the brand and version of soft-ware you are using.

• The type of hardware you are using (client and server).

• The details of what happened and what you were doing when the problemoccurred.

• The exact wording of any messages that appeared on your screen.

UniVerse DocumentationUniVerse documentation includes the following:

UniVerse BASIC: Contains comprehensive information about the UniVerseBASIC language. It includes reference pages for all BASIC statements andfunctions. It is for experienced programmers.

UniVerse BASIC SQL Client Interface Guide: Describes how to use the BASICSQL Client Interface (BCI), an interface to UniVerse and non-UniVerse data-bases from UniVerse BASIC. The BASIC SQL Client Interface uses ODBC-like

Page 12: UniVerse ODBC Guide

xii UniVerse ODBC Guide

function calls to execute SQL statements on local or remote database serverssuch as UniVerse, ORACLE, SYBASE, or INFORMIX. This book is for experi-enced SQL programmers.

Administering UniVerse: Describes tasks performed by UniVerse administra-tors, such as starting up and shutting down the system, system configurationand maintenance, system security, maintaining and transferring UniVerseaccounts, maintaining peripherals, backing up and restoring files, andmanaging file and record locks, and network services. This book includesdescriptions of how to use the UniVerse Admin program on a Windows clientand how to use shell commands on UNIX systems to administer UniVerse.

UniVerse Transaction Logging and Recovery: Describes the UniVerse transac-tion logging subsystem, including both transaction and warmstart loggingand recovery. This book is for system administrators.

UniVerse System Description: Provides detailed and advanced informationabout UniVerse features and capabilities for experienced users. This bookdescribes how to use UniVerse commands, work in a UniVerse environment,create a UniVerse database, and maintain UniVerse files.

UniVerse User Reference: Contains reference pages for all UniVersecommands, keywords, and user records, allowing experienced users to refer tosyntax details quickly.

Guide to RetrieVe: Describes RetrieVe, the UniVerse query language that letsusers select, sort, process, and display data in UniVerse files. This book is forusers who are familiar with UniVerse.

Guide to ProVerb: Describes ProVerb, a UniVerse processor used by applica-tion developers to execute prestored procedures called procs. This bookdescribes tasks such as relational data testing, arithmetic processing, andtransfers to subroutines. It also includes reference pages for all ProVerbcommands.

Guide to the UniVerse Editor: Describes in detail how to use the Editor,allowing users to modify UniVerse files or programs. This book also includesreference pages for all UniVerse Editor commands.

UniVerse NLS Guide: Describes how to use and manage UniVerse’s NationalLanguage Support (NLS). This book is for users, programmers, andadministrators.

UniVerse SQL Administration for DBAs: Describes administrative tasks typi-cally performed by DBAs, such as maintaining database integrity and security,

Page 13: UniVerse ODBC Guide

Preface xiii

and creating and modifying databases. This book is for database administra-tors (DBAs) who are familiar with UniVerse.

UniVerse SQL User Guide: Describes how to use SQL functionality in UniVerseapplications. This book is for application developers who are familiar withUniVerse.

UniVerse SQL Reference: Contains reference pages for all SQL statements andkeywords, allowing experienced SQL users to refer to syntax details quickly. Itincludes the complete UniVerse SQL grammar in Backus Naur Form (BNF).

UniVerse Master Index: A comprehensive index for UniVerse documentation.

UniVerse Quick Reference: A quick reference to all UniVerse commands andkeywords. It also summarizes UniVerse SQL statements and keywords, allelements of the UniVerse BASIC language, Editor commands, ProVerbcommands, file types, file dictionaries, and user exits.

Related DocumentationThe following documentation is also available:

UniVerse GCI Guide: Describes how to use the General Calling Interface (GCI)to call subroutines written in C, C++, or FORTRAN from BASIC programs.This book is for experienced programmers who are familiar with UniVerse.

UniVerse ODBC Guide: Describes how to install and configure a UniVerseODBC server on a UniVerse host system. It also describes how to use UniVerseODBC Config and how to install, configure, and use UniVerse ODBC driverson client systems. This book is for experienced UniVerse developers who arefamiliar with SQL and ODBC.

UV/Term Guide: Provides step-by-step instructions for how to install theUV/Term software on a PC, how to define terminal parameters, and how tostart up and use UV/Term. This book also describes the terminal emulatorwindow and how to configure the graphical user interface.

UV/Net II Guide: Describes UV/Net II, the UniVerse transparent databasenetworking facility that lets users access UniVerse files on remote systems.This book is for experienced UniVerse administrators.

UniVerse Guide for Pick Users: Describes UniVerse for new UniVerse usersfamiliar with Pick-based systems.

Moving to UniVerse from PI/open: Describes how to prepare the PI/open envi-ronment before converting PI/open applications to run under UniVerse. This

Page 14: UniVerse ODBC Guide

xiv UniVerse ODBC Guide

book includes step-by-step procedures for converting INFO/BASICprograms, accounts, and files. This book is for experienced PI/open users anddoes not assume detailed knowledge of UniVerse.

Common APIs DocumentationThe following books document application programming interfaces (APIs) usedfor developing client applications that connect to UniVerse and UniData servers.

Administrative Supplement for Common APIs: Introduces Ardent Software’sfive common APIs, and provides important information that developers usingany of the common APIs will need. It includes information about the UniRPC,the UCI Config Editor, the ud_database file, and device licensing.

UCI Developer’s Guide: Describes how to use UCI (Uni Call Interface), aninterface to UniVerse databases from C-based client programs. UCI usesODBC-like function calls to execute SQL statements on local or remoteUniVerse servers. This book is for experienced SQL programmers.

InterCall Developer’s Guide: Describes how to use the InterCall API to accessdata on UniVerse and UniData systems from external programs. This book isfor experienced programmers who are familiar with UniVerse or UniData.

UniObjects Developer’s Guide: Describes UniObjects, an interface to UniVerseand UniData systems from Visual Basic. This book is for experienced program-mers and application developers who are familiar with UniVerse or UniData,and with Visual Basic, and who want to write Visual Basic programs thataccess these databases.

UniObjects for Java Developer’s Guide: Describes UniObjects for Java, aninterface to UniVerse and UniData systems from Java. This book is for experi-enced programmers and application developers who are familiar withUniVerse or UniData, and with Java, and who want to write Java programsthat access these databases.

Using UniOLEDB: Describes how to use UniOLEDB, an interface to UniVerseand UniData systems for OLE DB consumers. This book is for experiencedprogrammers and application developers who are familiar with UniVerse orUniData, and with OLE DB, and who want to write OLE DB programs thataccess these databases.

Page 15: UniVerse ODBC Guide

UniVerse ODBC Client/Server Overview 1-1

1UniVerse ODBC

Client/Server Overview

This chapter provides an overview of how a UniVerse ODBC client/server systemworks. It also describes the UniVerse ODBC driver conformance levels.

How UniVerse ODBC WorksThe UniVerse ODBC server lets ODBC applications connect to the UniVerse data-base management system (DBMS) through the UniVerse ODBC driver.

The UniVerse ODBC driver is an implementation of the Microsoft ODBCVersion 2.0 specification. The UniVerse ODBC driver’s streamlined communica-tion architecture executes queries and retrieves data faster than other ODBCdrivers.

An ODBC application sends a connection request for a data source name defini-tion (DSN) to the UniVerse ODBC driver. The driver receives the request, thenestablishes a connection to the UniVerse ODBC server. The server then establishesa connection to the UniVerse DBMS.

Figure 1-1 shows an overview of the UniVerse ODBC client/server architecture.

Page 16: UniVerse ODBC Guide

1-2 UniVerse ODBC Guide

The UniVerse ODBC ServerThe UniVerse ODBC server comprises several components. The main serverprogram uvosrv is a process that communicates with UniVerse directly using UCI(Uni Call Interface). uvosrv communicates with the UniVerse ODBC driver overTCP/IP in a controlled protocol.

The UniVerse ODBC DriverThe UniVerse ODBC driver requests a connection to the server through theUniVerse ODBC remote execution service on Windows NT and through the stan-dard rexec system service on UNIX.

UniVerse ODBC Client ApplicationsA UniVerse ODBC client application, such as a custom-written ODBC applicationor a commercial application such as Microsoft Access or PowerBuilder, connectsto the UniVerse ODBC driver, which establishes connections to remote datasources and sends database requests to one or more UniVerse ODBC servers.Applications access ODBC data sources that are mapped to UniVerse accountsthrough entries in the UniVerse ODBC configuration file. This file contains

UniVerse ODBC Server

UniVerse

DBMS

UniVerse Driver

ODBC Client Application

Figure 1-1. UniVerse ODBC Client/Server Architecture

UniVerse ODBC Driver

Page 17: UniVerse ODBC Guide

UniVerse ODBC Client/Server Overview 1-3

connection parameters necessary to route requests to the appropriate UniVerseODBC server.

When an application connects to a data source, it reads the UniVerse ODBCconfiguration and initialization files on the client system to determine the hostsystem, user name, and password to use when accessing a particular server.

A UniVerse ODBC application accesses UniVerse databases across various oper-ating systems. Each configuration entry describes the physical attributes of adatabase in sufficient detail to perform three tasks:

• Establish communications• Launch a UniVerse ODBC server process• Route query and update requests

UniVerse ODBC ConfigUniVerse ODBC Config is a stand-alone client application that configures your32-bit Windows client system for access to data sources on UniVerse ODBCservers. It manages UniVerse ODBC configuration files. UniVerse ODBC Configprovides an easy way to enter, edit, and test entries in the configuration file. Bytesting configuration entries in UniVerse ODBC Config first, client applicationsgain trouble-free access to UniVerse ODBC servers. UniVerse ODBC Configprovides online help and various tests to explain network and database errors.

Every UniVerse ODBC data source definition must reference an entry in theUniVerse ODBC configuration file.

Use UniVerse ODBC Config to do the following:

• Create or edit a configuration file. UniVerse ODBC Config can change anentry in the configuration file even if the data source is relocated or thenetwork is altered. This shields application programs from changes in theclient/server environment.

• Merge configuration entries from other configuration files containing thedatabase configurations you need to access new data sources.

• Test, verify, and diagnose network and database access to remote hostsystems.

For more information about UniVerse ODBC Config, see “Using UniVerse ODBCConfig” on page 3-14.

Note: 16-bit Windows client systems use Version 3.0 of STAR/Config astheir configuration manager. For more information, see STAR/ConfigUser’s Reference.

Page 18: UniVerse ODBC Guide

1-4 UniVerse ODBC Guide

Client/Server InteractionTo begin a dialog between the UniVerse ODBC driver and a UniVerse server, thedriver requests a connection with the UniVerse ODBC remote execution serviceon Windows NT systems or the standard rexec system service on UNIX systems.The remote execution service does the following:

• Authenticates the user name and password• Creates a server process

After establishing a successful connection, the client application usually initiates aquery to the server process. When the client disconnects, the application’s serverprocesses are logged out.

Connection LicensesIf your connection does not use device licensing, each connection from an ODBCclient application to the UniVerse ODBC server requires one UniVerse ODBCserver connection license and one UniVerse user license. If your applicationmakes multiple simultaneous connections to UniVerse, each one uses oneUniVerse ODBC server connection license and one UniVerse user license.

For information about device licensing, see Administering UniVerse.

UniVerse ODBC Driver Conformance LevelsConformance levels help application and driver developers by establishing stan-dards of functionality. This section describes how UniVerse ODBC Release 3.7conforms to the Microsoft ODBC 2.0 Programmer’s Reference and SDK Guide. ODBCdefines conformance levels for an ODBC driver in two areas:

• ODBC API• ODBC SQL grammar, including ODBC SQL data types

The following table summarizes ODBC compliance levels for the UniVerse ODBCdriver. For more information about ODBC conformance levels, see MicrosoftODBC 2.0 Programmer’s Reference and SDK Guide.

Driver ODBC API ODBC SQL Grammar

UniVerse ODBC Core, Level 1, and Level 2features as described in“ODBC API ConformanceLevels”

Minimum, core, and extendedfeatures described in “ODBCSQL Grammar ConformanceLevels”

Page 19: UniVerse ODBC Guide

UniVerse ODBC Client/Server Overview 1-5

The UniVerse ODBC driver also provides connection and statement options tocontrol additional option values specific to UniVerse ODBC.

ODBC API Conformance LevelsThe UniVerse ODBC driver conforms to the ODBC Core API and Level 1 APIfunctionality. In addition, the UniVerse ODBC driver supports the followingLevel 2 functions:

• SQLMoreResults1

• SQLNativeSql• SQLNumParams

Unsupported Level 2 FunctionsThe UniVerse ODBC driver does not support the following Level 2 functions:

• SQLBrowseConnect• SQLColumnPrivileges• SQLDescribeParam• SQLExtendedFetch• SQLForeignKeys• SQLParamOptions• SQLPrimaryKeys• SQLProcedureColumns• SQLProcedures• SQLSetPos• SQLSetScrollOptions• SQLTablePrivileges

ODBC SQL Grammar Conformance LevelsThe UniVerse ODBC driver conforms to almost all core SQL grammar. For a list ofexceptions, see “Support for Core ODBC SQL Grammar” on page A-2. Fordetailed information on ODBC SQL grammar conformance in UniVerse ODBC,see “Support for Extended ODBC SQL Grammar” on page A-2.

1. SQLMoreResults never returns more than one result set or row count.

Page 20: UniVerse ODBC Guide

1-6 UniVerse ODBC Guide

Supported Extended ODBC SQL GrammarThe UniVerse ODBC driver supports some of the extended ODBC SQL grammarfeatures. These include:

• Outer joins• UNION clause• SELECT…FOR UPDATE statement• Scalar functions such as SUBSTRING and CONCAT• DATE and TIME data types• Procedure calls

Supported SQL Data TypesUniVerse ODBC supports the following SQL data types:

• CHAR• DATE• DECIMAL• DOUBLE PRECISION• FLOAT• INTEGER• NUMERIC• REAL• SMALLINT• TIME• VARCHAR

Universe ODBC Server and Client CompatibilityUniVerse ODBC Server Version 3.7 is compatible with the following UniVerseODBC client software:

• UniVerse ODBC Driver Version 3.7

• UniVerse ODBC Config Version 3.7. If the Encrypt Passwords option isused, the configuration file can be used only by Version 3.7 client software.

• STAR/Config Version 2.1 or later. Configuration files with encrypted pass-words are not supported.

• STAR/ODBC FP and STAR/ODBC FP 32 Version 3.0

– Configuration files with encrypted passwords are not supported.– ODBC procedures are not supported.– Data source connection options for NLS are not supported.

Page 21: UniVerse ODBC Guide

UniVerse ODBC Client/Server Overview 1-7

STAR/View, STAR/DDE, STAR/C and STAR/ODBC (non-FP) clients do notwork with any UniVerse ODBC server.

Tested ODBC Client ApplicationsUniVerse ODBC Server Version 3.7 has been tested with the following 32-bitWindows ODBC client applications:

• Microsoft Access Versions 95 (7.0) and 97• Microsoft Visual Basic Enterprise Edition Versions 4.0 and 5.0• Microsoft Query Versions 2.0 and 8.0• Powersoft Powerbuilder 5.0• Cognos Impromptu Version 3.0

UniVerse ODBC LimitationsThe following sections describe known UniVerse ODBC limitations with thefollowing clients:

• Microsoft Access• Microsoft Query• Visual Basic

Microsoft AccessWhen running queries in Microsoft Access, performance can be significantlyaffected if the primary key of a UniVerse table or file is not accessible to UniVerseODBC. This can occur in either of the following cases:

• If the primary key is excluded from the @SELECT phrase in the dictionaryof a table or file.

• If the primary key is excluded and ID.SUP is specified in the @ phrase of afile dictionary containing no @SELECT phrase. (UniVerse ignores the@ phrase in table dictionaries.)

To get the best possible performance from Microsoft Access, we recommend thatthe primary key be accessible to UniVerse ODBC. For more information, seeChapter 4.

Microsoft Access has the following functional limitations imposed by its use ofthe Microsoft Jet database engine:

• Only the first 255 columns of an ODBC table are accessible. All othercolumns are hidden from the user.

Page 22: UniVerse ODBC Guide

1-8 UniVerse ODBC Guide

• Access does not allow importing or linking ODBC tables with table orcolumn names longer than 64 characters.

Columns defined with a UniVerse SQL data type of DECIMAL or NUMERIC anda precision greater than 15 digits are converted to Text fields by Microsoft Access.

When inserting new rows into a table whose underlying UniVerse representationis an association or an unassociated multivalued field, be sure to enter a value forthe @ASSOC_ROW pseudocolumn (with name mapping on, this column is calledZ_ASSOC_ROW). Failure to specify a value for @ASSOC_ROW can causeAccess 97 to abort with an access violation error.

When creating a query in Microsoft Access, you can specify an SQL statement asthe basis of the query. Due to a bug in Access, any SQL statement containing theUNION keyword fails to execute. Before submitting the query to ODBC forexecution, Access rewrites the SQL and puts parentheses around each SELECTstatement, which is invalid ODBC SQL syntax. For example:

SELECT * FROM U_TABLE UNION SELECT * FROM U_TABLE

would be rewritten by Access as:

( SELECT * FROM U_TABLE ) UNION ( SELECT * FROM U_TABLE )

Microsoft QueryMicrosoft Query is accessed via “Get External Data” from Microsoft Excel.

An attempt to connect to a UniVerse account containing a table name or filenamelonger than 65 characters fails with a General ODBC Error. This is due to a bug inMicrosoft Query, which fails to allocate enough memory to accommodate ODBCtable names, which can contain up to 128 characters as defined in the ODBC 2.0specification. Microsoft has confirmed that this is a problem with Query, but is notplanning to provide a fix in any future release.

When connecting to a UniVerse account that is not a schema, only UniVerse filesreferenced by that account are made available by Microsoft Query. All UniVersetables are excluded from the list of available tables, and the list of availableschemas is disabled. Microsoft has confirmed that this is a problem with Query,but is not planning to provide a fix in any future release.

When connecting to a UniVerse schema, only UniVerse tables are made availableby Microsoft Query. UniVerse files are excluded from the list of available tables.Due to a bug in Microsoft Query, any ODBC tables reported with an empty stringas the ODBC table qualifier are ignored. Since Universe files are not part of aschema, UniVerse ODBC reports their ODBC table qualifier as the empty string,

Page 23: UniVerse ODBC Guide

UniVerse ODBC Client/Server Overview 1-9

in conformance with the ODBC 2.0 specification. Microsoft has confirmed thatthis is a problem with Query, but is not planning to provide a fix in any futurerelease.

For queries that select on numeric columns, Microsoft Query Version 1.0 quotesnumeric literals in the SQL statements it generates. When such a query isexecuted, it returns a Data type conflict error, because the quoted numeric literalis interpreted as a string and cannot be used in a numeric comparison. Thisproblem has been fixed in Version 2.0 of Microsoft Query, which is included withMicrosoft Excel for Windows 95 Version 7.0.

Microsoft Query provides visibility only to the first 255 columns of an ODBCtable. All other columns are hidden from the user.

Microsoft Query does not allow adding tables to a query that have column nameslonger than 64 characters. Attempts to do so fail with a “Can’t access table”message. However, such tables are accessible by building a query using an SQLstatement which SELECTs the table. To execute an SQL statement, choose“Execute SQL...” from the File menu.

We suggest you use Query Designer with Microsoft Query 8.0 (available in Micro-soft Office 97) rather than Query Wizard. If you use Query Wizard to createqueries having selection criteria, Microsoft Query generates an SQL statementhaving invalid syntax, and the query fails to execute. Microsoft has confirmedthat this is a problem with Query, but is not planning to provide a fix in any futurerelease. To use Query Designer, make sure the Query Wizard box is uncheckedwhen the Choose Data Source dialog box appears.

File DSNsIf you have problems using File DSNs, you can generally circumvent them usingthe file DSN as a pass-through mechanism to an existing User or System DSN. Dothis by manually editing the file DSN file and inserting a single line after the[ODBC] section header as follows:

[ODBC]DSN=<your User or System DSN name >

Use your User or System DSN name as defined in the registry. No other linesshould be present in the ODBC section. When your application requires a fileDSN (because it uses the FILEDSN keyword in its SQLDriverConnect call), theDriver Manager finds the file DSN and then extracts all needed connection infor-mation from the User or System DSN.

Page 24: UniVerse ODBC Guide

1-10 UniVerse ODBC Guide

Visual BasicData Access Objects have the following functional limitations imposed by theiruse of the Microsoft Jet database engine:

• Only the first 255 columns of an ODBC table are accessible. All othercolumns are hidden from the user.

• ODBC Tables with table names longer than 64 characters are inaccessible.

• ODBC Tables with column names longer than 64 characters are accessiblefor queries, but attempts to insert, update, or delete rows from the tablewill fail.

The above limitations do not exist with Remote Data Objects.

Page 25: UniVerse ODBC Guide

Getting Started 2-1

2Getting Started

This chapter describes how to prepare your UniVerse system to be a server forUniVerse ODBC client application programs. It also describes how to administer aUniVerse ODBC server.

UniVerse ODBC Server InstallationThe UniVerse ODBC server software is installed as part of the standard UniVerseinstallation. For platform-specific information about installing UniVerse,including UniVerse ODBC, see the UniVerse release notes. For information aboutauthorizing the UniVerse ODBC server, see “Authorizing the UniVerse ODBCServer” on page 2-5.

Configuring a UNIX System for UniVerse ODBCBefore you install UniVerse on a UNIX system, you need to check and possiblyadjust your system configuration in the following areas:

• UNIX system resources and properties• Users’ shell configuration scripts

Checking UNIX System Resources and PropertiesVerify that your system is configured as follows, and adjust it if necessary:

• The UNIX process table must be big enough to accommodate the numberof simultaneous users. Each UniVerse ODBC client connection uses fourUNIX processes:

– One process for the server startup script (UNIVERSE.TCP)– One process for the UniVerse ODBC server program itself– Two processes for UniVerse

Page 26: UniVerse ODBC Guide

2-2 UniVerse ODBC Guide

• The /etc/services file must contain an entry for the exec service on port 512.

• The /etc/inetd.conf file should contain a line like the following:

exec stream tcp nowait root /usr/etc/rexecd rexecd

• The auto-reboot command script (such as /etc/rc.2 or /etc/rc.local—it variesfrom system to system) must start up the inetd daemon.

Modifying Users’ Shell Configuration ScriptsWhen UniVerse ODBC clients connect to the server, they execute a UniVerseODBC server process. An improperly configured shell configuration script cancause the server process to hang or the connection to be refused.

If the client gets a Received unexpected data error upon connection, it islikely that a shell configuration script put something in the stdout or stderr streamthat disrupts the UniVerse ODBC client/server protocol. You can avoid such fail-ures by understanding how shell configuration scripts are executed when theserver starts, and by understanding the rules they must follow when the user is aUniVerse ODBC client program.

Understanding Server StartupWhen a UniVerse ODBC client requests a connection to the server, a UNIX processis established and the user is logged in. The scripts executed at login time dependon the type of shell (Bourne, C, and so on) that is configured for the view. Thefollowing table lists the scripts that are executed at server startup, in order fromtop to bottom. Do not modify the UniVerse ODBC server startup scripts(UNIVERSE.*), but you may need to check and modify the shell configurationscripts for each UNIX login used to serve a UniVerse ODBC client.

This shell… Executes these scripts…

C 1. .cshrc2. UNIVERSE.TCP

Bourne UNIVERSE.TCP

Other (ksh, tcsh, bash, etc.) 1. Shell configuration script1

2. UNIVERSE.TCP

1. See your UNIX shell documentation for details.

Page 27: UniVerse ODBC Guide

Getting Started 2-3

Preventing Connection FailuresTo prevent server startup failures, the shell configuration and login scripts forUniVerse ODBC users must follow certain rules of client/server interaction. Thefollowing rules represent good practice in general, but they are particularlyimportant when the same UNIX login used by a terminal user is used by aUniVerse ODBC client application:

• Perform all user I/O in the login script, not in the shell configurationscript. To test for user I/O in the shell configuration script, log in to theUNIX system as an interactive user and enter rsh `hostname` echogood 1. The remote shell should ask no questions and should display nooutput other than the word good . Move commands intended for interac-tive use to the user’s login script, or execute them in the shell configurationscript only if the shell is started interactively.

• Do not redirect or echo to stdin, stdout, or stderr. Echoing to a log file isacceptable, but when a UniVerse ODBC server runs, stdin must containonly inbound UniVerse ODBC server requests, and stdout and stderr mustcontain only outbound UniVerse ODBC server responses.

• Do not run any programs that could introduce long delays (for example,those that wait for external events). Clients and servers wait a prescribedamount of time to acknowledge each other before failing with an error.

• The script must return to the UNIX shell prompt. Entering UniVerse orinvoking a menu hangs the server process, and the client’s attempt toconnect fails.

• The user must own the script and must have read and execute permis-sions to it.

Configuring UCI for UniVerse ODBCThe UniVerse ODBC server uses UCI (Uni Call Interface) to access UniVerse data.To access your data from UniVerse ODBC, you may need to increase the values oftwo configuration parameters for the UNIVERSE DBMS type. These parametersare defined in the UCI configuration file. You may also need to increase the UCIconnection timeout.

For details about configuring UCI, see UCI Developer’s Guide.

1. Use the remsh command in place of rsh on HP-UX systems. On SCO UNIXsystems, use rcmd.

Page 28: UniVerse ODBC Guide

2-4 UniVerse ODBC Guide

Changing the MAXFETCHCOLS ParameterThe default MAXFETCHCOLS setting is 400 column values. Increase the value ofthe MAXFETCHCOLS configuration parameter if either of the followingconditions applies:

• Any of your UniVerse files, tables, or views have more than 400 fieldsdefined in the dictionary (field definitions include D-, A-, I-, andS-descriptors)

• Any queries executed from ODBC client applications through UniVerseODBC contain more than 400 columns in the result set

Changing the MAXFETCHBUFF ParameterThe default MAXFETCHBUFF setting is 8192 bytes. Increase the value of theMAXFETCHBUFF configuration parameter if either of the following conditionsapplies:

• The record length of any table or file exceeds 8192 bytes

• Any queries executed through UniVerse ODBC yield a result set with rowslonger than 8192 bytes

ExampleThe following UCI configuration file definition sets MAXFETCHCOLS to 1000and MAXFETCHBUFF to 32000 for all UNIVERSE data sources:

<localuv>DBMSTYPE = UNIVERSEnetwork = TCP/IPservice = uvserverhost = localhost

[UNIVERSE]MAXFETCHCOLS = 1000MAXFETCHBUFF = 32000

If any query you try to execute has more than MAXFETCHCOLS result columnsor has a result row length greater than MAXFETCHBUFF bytes, the query failswith a UCI error code of 930122:

[Ardent][SQL Client][UNIVERSE]UniVerse/SQL: Row lengthexceeds buffer size

Page 29: UniVerse ODBC Guide

Getting Started 2-5

Changing the UCI Connection TimeoutThe six-minute default inactivity timeout value for UCI connections can be tooshort. If users leave client ODBC connections open but inactive for longer than sixminutes, they can receive UniVerse error code 81015. To increase this timeoutvalue, log in as a UniVerse Administrator and edit the unirpcservices file in theunishared/unirpc directory. In the line starting with uvserver, change the rightmostnumber to 864,000 (10 times the number of seconds in a 24-hour day). The lineshould appear as follows:

uvserver <uvhome>/bin/uvsrvd * TCP/IP 864000

<uvhome> is the path of the UV account directory (for example, /usr/ardent/uv onUNIX systems or \Ardent\UV on Windows NT systems).

Administering the UniVerse ODBC ServerThis section describes the following administrative tasks:

• Authorizing the UniVerse ODBC server• Making UniVerse files accessible to ODBC clients• Removing ODBC access to UniVerse files• Using the UniVerse Server Administration menu

Authorizing the UniVerse ODBC ServerOn UNIX systems, use the UniVerse License Administration menu to authorizeUniVerse ODBC. For information about UniVerse License Administration, seeAdministering UniVerse.

Note: The UniVerse ODBC authorization code is different from the UniVerseauthorization code.

Making UniVerse Files Accessible to ODBC ClientsUniVerse tables and views are always accessible to ODBC clients. To use UniVersefiles that are not tables, however, you must make them accessible—that is,visible—to ODBC clients. To make such files visible to ODBC clients:

1. Change directory to the UniVerse ODBC administration account directory(HS.ADMIN). For example, if UniVerse is installed in /usr/ardent/uv, enter:

# cd /usr/ardent/uv/HS.ADMIN

2. Invoke UniVerse and enter HS.ADMIN to display the UniVerse Server Admin-istration menu.

Page 30: UniVerse ODBC Guide

2-6 UniVerse ODBC Guide

3. Enter 3 to choose Activate Access to Files in an Account from the UniVerseServer Administration menu. For information about UniVerse Server Admin-istration menu options, see “UniVerse Server Administration Menu” onpage 2-7.

4. Do one of the following:

a. Enter the full pathname of the UniVerse account directory (onWindows NT systems, start with the drive letter, for example D: ).

b. Enter the UniVerse account name as listed in the UV.ACCOUNT file.

c. Press Enter to see a list of UniVerse accounts in which file access hasalready been activated.

5. Repeat steps 3 and 4 for all accounts whose files you want to make accessibleto UniVerse ODBC.

6. When finished, press Enter to exit the UniVerse Server Administration menu.

For a detailed description of how to make UniVerse data accessible to ODBCclients, see Chapter 4.

Removing ODBC Access to UniVerse FilesTo remove UniVerse ODBC access to UniVerse files that are not tables:

1. Change directory to the UniVerse ODBC administration account directory(HS.ADMIN). For example, if UniVerse is installed in /usr/ardent/uv, enter:

# cd /usr/ardent/uv/HS.ADMIN

2. Invoke UniVerse and enter HS.ADMIN to display the UniVerse Server Admin-istration menu.

3. From the UniVerse Server Administration menu, enter 4 to choose DeactivateAccess to Files in an Account. You are prompted for the name of the accountwhose files you want to deactivate.

4. Do one of the following:

a. Enter the full pathname of the UniVerse account (on Windows NT, startwith the drive letter, for example D: ).

b. Enter the account name as listed in the UV.ACCOUNT file.

c. Press Enter to see a list of UniVerse accounts in which file access hasalready been activated.

Page 31: UniVerse ODBC Guide

Getting Started 2-7

When you enter an account name, the UniVerse ODBC-specific VOC entriesand the file information cache are removed, and the HS_FILE_ACCESS file isdeleted.

Note: This does not modify files or their dictionaries in the account, nor doesit delete the account.

5. Repeat steps 3 and 4 for all accounts whose files are accessible to UniVerseODBC.

6. When finished, press Enter to exit the UniVerse Server Administration menu.

UniVerse Server Administration MenuUse the UniVerse Server Administration menu to perform UniVerse ODBCsystem administration tasks. To display the menu:

1. Log in as a UniVerse Administrator.

2. Change directory to the UniVerse ODBC administration account directory(HS.ADMIN). For example, enter:

cd /usr/ardent/uv/HS.ADMIN (UNIX)

cd \Ardent\UV\HS.ADMIN (Windows NT)

3. Invoke UniVerse and enter HS.ADMIN.

To exit the menu, press Enter.

Menu OptionsThe UniVerse Server Administration menu includes the options shown inTable 2-1.

Table 2-1. UniVerse Server Administration Menu Options

Option Description

1. List Activated AccountsList UniVerse accounts whose files are accessible to UniVerse ODBCclients.

2. Show UniVerse ODBC Config Configuration for an AccountDisplay configuration settings that clients need to access the account.This option invokes HS.SHOW.CONFIG.

Page 32: UniVerse ODBC Guide

2-8 UniVerse ODBC Guide

3. Activate Access to Files in an AccountMake UniVerse files in an account accessible to ODBC clients. Thisoption runs the UniVerse ODBC file access utility, which does thefollowing:

• Creates the HS_FILE_ACCESS file• Creates the server’s file information cache• Updates the UV.ACCOUNT file

4. Deactivate Access to Files in an AccountRemove access to UniVerse files in an account. This option deletes theserver file information cache and the HS_FILE_ACCESS file, andupdates the UV.ACCOUNT file.

5. Run HS.SCRUB on a File/TableDetect, report, and optionally correct data and dictionary entries thatcan cause ODBC access problems. This option invokes HS.SCRUB.

6. Update File Information Cache in an AccountRebuild the file information cache. This option invokesHS.UPDATE.FILEINFO.

Table 2-1. UniVerse Server Administration Menu Options (Continued)

Option Description

Page 33: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-1

3Installing and Configuring

UniVerse ODBC Client

This chapter describes how to install and configure UniVerse ODBC client soft-ware. Install the client software on a PC running Windows NT 4.0, Windows 98,or Windows 95.

You can also install the 16-bit version of UniVerse ODBC client on a Windows 3.1(or later) system. The 16-bit Windows installation is similar to the one docu-mented here, but you must install one of the supported TCP/IP packages if youdon’t already have one, and you must use STAR/Config instead of UniVerseODBC Config to configure the client system.

Figure 3-1 on page 3-2 summarizes the client installation, configuration, andtesting procedures.

Installing UniVerse ODBC Client SoftwareInstall the following UniVerse ODBC client software on a PC:

• UniVerse ODBC driver to communicate with applications• UniVerse ODBC Config to define and test UniVerse ODBC configurations

Verify the Client ConfigurationTo avoid installation and operation problems, we recommend that you verify theclient hardware and software configuration requirements before proceeding withthe installation. For more information, install the UniVerse ODBC client softwareand refer to the UniVerse ODBC client release notes (choose Start ➤ Programs ➤Ardent UniVerse ➤ UVODBC Client Release Notes).

Page 34: UniVerse ODBC Guide

3-2 UniVerse ODBC Guide

Install UniVerse ODBC ClientThe UniVerse ODBC client setup program installs UniVerse ODBC client compo-nents onto your hard drive, modifies your system settings appropriately, andinserts the relevant program icons in your Start menu.

To install UniVerse ODBC client:

1. Insert the UniVerse Clients CD in the CD-ROM drive.

2. The Master Setup screen should appear automatically. If Auto Run isswitched off and the screen does not appear, choose the CD-ROM drive fromExplorer, then choose install.exe.

3. Choose UV/ODBC Client from the UniVerse Master Setup screen. Thewelcome screen appears.

Figure 3-1. Client Installation Process

Verify client hardware andsoftware configuration.

Run UniVerse ODBCConfig to create an entryto enable access to the

servers.

Distribute serverconfiguration files to

UniVerse ODBC clients.

Done.

Install UniVerse ODBCclient components.

Invoke UniVerse ODBCConfig from the ODBCAdministrator.

Page 35: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-3

4. Choose 16-bit or 32-bit installation.

• If you choose 16-bit, the Windows Notepad appears with instructions onhow to install the 16-bit version of UniVerse ODBC client elements.

• If you choose 32-bit, follow the instructions on the screen until the installa-tion is complete.

Configuring UniVerse ODBC ClientTo configure UniVerse ODBC client software, do the following:

• Define one or more data sources and their configurations.• Distribute copies of your configuration file to client systems.

Define a Data Source and a ConfigurationRun UniVerse ODBC Config to define a configuration. A UniVerse ODBC configu-ration defines the following:

• Server identification (system name and system type)• Server authorization (user name and password)• UniVerse account to access using UniVerse ODBC

Configurations are stored in the UniVerse ODBC configuration file(CONFIG.HSC). A default configuration file is created when the UniVerse ODBCclient package is installed.

Note: We recommend that you create a backup copy of the configuration file inanother location. The procedure for removing the ODBC client softwaredeletes the UniVerse ODBC installation directory, including the configura-tion file if it is kept there. If you copy the configuration file to anotherlocation, you can tell the Setup program where it is without having torecreate it.

After you build and test a configuration file using UniVerse ODBC Config, youcan distribute it to your client users. Users can install UniVerse ODBC client pack-ages themselves, but they cannot access a UniVerse ODBC server until you givethem the configuration information they need. You may want to keep a configura-tion file identical to the one your users have.

The following procedure tells you how to define configurations that provideaccess to the UniVerse sample files.

Page 36: UniVerse ODBC Guide

3-4 UniVerse ODBC Guide

To define a UniVerse ODBC data source:

1. Open the ODBC Data Source Administrator window by doing one of thefollowing:

• Choose Start ➤ Programs ➤ Ardent UniVerse ➤ ODBC Admin• Double-click the ODBC icon in the Windows Control Panel

2. Click Add. The list of installed ODBC drivers appears. If a UniVerse ODBCdriver does not appear on the list, you did not properly install the UniVerseODBC client.

3. Choose the Ardent UniVerse driver and click Finish. The UniVerse ODBCData Source Setup dialog box appears.

Page 37: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-5

4. To define a new ODBC data source:

a. Enter the data source name of your choice in the ODBC Data SourceName field. ODBC applications use this name to connect to the datasource.

b. Enter the name of a new or existing configuration entry in the UV/ODBCConfiguration Name field. The configuration entry is in the UniVerseODBC configuration file (CONFIG.HSC).

c. (Optional) Enter a description in the Description field.

d. Click Options >> to apply more data source setup options. For informa-tion about these options, see “Other Data Source Setup Options” onpage 3-8.

Note: If you are new to the UniVerse ODBC driver, use the default set-tings. To do this, omit step d and proceed to step 5.

5. To configure a new data source:

a. Click Configure… to invoke UniVerse ODBC Config. The UniVerseODBC Configuration Editor dialog box appears with the configurationname you entered in the UV/ODBC Configuration Name field.

Page 38: UniVerse ODBC Guide

3-6 UniVerse ODBC Guide

b. The UniVerse ODBC Configuration Editor dialog box has two pages:Required and Optional. Be sure to set required parameters and fieldsfirst. Click the Required tab.

c. Under Server Connection Information, set the parameters and enterauthorization information as follows:

d. Click the Optional tab to enter optional information for the configuration.

In this field… Enter…

System Name The UniVerse ODBC server system name.

System Type UNIX or WINDOWS NT.

User Name A valid user name for the UniVerse ODBC serversystem.

For Windows NT servers, use the following format:

domain_name\username

domain_name is either a Windows NT domain namefor your login domain or the name of your work-station. username is the Windows NT user name.

Password A valid password for the user name.

UV/ODBC ServerInstallationDirectory

The pathname of the UniVerse ODBC server instal-lation directory, which is the uvodbc subdirectory inthe UV account directory. This field is disabled ifthe system type is Windows NT.

UniVerse AccountPathname

One of the following:

• The full pathname of the UniVerse accountto access

• The name of a UniVerse account as definedin the UV.ACCOUNT file

• The name of a UniVerse schema as definedin the UV_SCHEMA table

Page 39: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-7

Note: Default values work for most configurations, therefore you neednot modify them. As indicated, some values should be altered onlyon the advice of Ardent Customer Support.

e. Click Create Server Debug Log if you want an activity log to help youdebug the configuration.

f. Set the Connection parameters as follows:

In this field… Enter…

Inactivity timeout in minutes The amount of time an inactiveUniVerse ODBC server should waitbefore terminating. The default is240.

Client check interval in minutes The frequency with which theUniVerse ODBC server checks tosee that the UniVerse ODBC clientapplication is still running. Thedefault is 5.

REXEC service port number The default is 512. Alter this settingonly on the advice of ArdentCustomer Support.

Page 40: UniVerse ODBC Guide

3-8 UniVerse ODBC Guide

g. Use the Program field to specify the server startup script. Alter thissetting only on the advice of Ardent Customer Support.

h. Use the Parameters field to control the operation of the UniVerse ODBCserver. Alter this setting only on the advice of Ardent Customer Support.

i. Click Ping to test the network path to the specified server system. If thetest fails, verify the physical connection to the server, and your TCP/IPconfiguration. Make sure that the server system name is listed in yourTCP/IP hosts file or your domain name server.

j. Click Test to test the database connection. If the test fails, check yourentries and retest.

k. After the test succeeds, you can optionally remove user names and pass-words. To do this, click the Required tab. UniVerse ODBC prompts forthis information at connection time if the configuration does not specifyit.

l. Click OK to go to the UniVerse ODBC Config window. For completedetails about this window, see “Using the UniVerse ODBC ConfigWindow” on page 3-14.

6. Choose File ➤ Save to make your changes permanent.

7. Minimize or exit the UniVerse ODBC Config window.

8. On the UniVerse ODBC Data Source Setup screen, click OK to accept yourconfiguration.

9. On the ODBC Data Source Administrator screen, click OK to accept your datasource definition.

Other Data Source Setup OptionsThe following sections describes the data source setup options shown at thebottom of the UniVerse ODBC Data Source Setup dialog box.

Note: You can also set data source setup options using an ODBC applicationwritten in C or C++ with the SQLDriverConnect, SQLSetStmtOption,and SQLSetConnectOption functions. Options specific to UniVerseODBC are defined in the uvodbc.h file, located in the client installationdirectory.

Page 41: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-9

Strict Statement Compliance Options

Option Description

Enforce ODBCDates/Times

If selected: UniVerse ODBC checks all date andtime literals for strict adherence to ODBC specifica-tions: years must be specified with four digits, andmonths, days, hours, minutes, and seconds musteach be specified with two digits.If not selected: UniVerse ODBC accepts two-digityears, and single-digit months, days, hours,minutes, and seconds, and passes these shorterdigits to UniVerse.

Enforce ODBC FunctionArgument Types

If selected: UniVerse ODBC type-checks argu-ments to scalar functions where possible.If not selected: UniVerse ODBC passes all argu-ments to scalar functions to UniVerse withoutperforming any type-checking.

Reject non-ODBC SQLSyntax

If selected: UniVerse ODBC reports an error if itencounters an SQL construct that is not in theODBC SQL grammar. Select this option if you arewriting an application that needs to be portable toother ODBC drivers or databases, or both.If not selected: UniVerse ODBC accepts certainnon-ODBC SQL constructs.1

1. For example, ODBC SQL defines only the COUNT(*) set function, not theCOUNT(column) set function.

Reject Constructs Unsup-ported by UniVerse

If selected: UniVerse ODBC returns an error if itencounters an SQL construct that is part of theODBC SQL grammar but which UniVerse does notsupport.2

If not selected: UniVerse ODBC passes unsup-ported constructs to UniVerse, which will thenissue its own error message.

2. For example, nested outer joins. For more examples, see Appendix A.

Page 42: UniVerse ODBC Guide

3-10 UniVerse ODBC Guide

UniVerse ODBC Options

Performance Options

Option Description

UniVerse Name Mapping Name mapping controls whether UniVerse ODBCmaps the names of tables, columns, and indexes toODBC-compliant equivalents. See “ODBC NameMapping” on page 4-20 for more information.Name mapping is on when Yes is selected, and isoff when No is selected. When Server is selected,the UniVerse ODBC server environment variableHS_NAME_MAPPING controls whether namemapping is on or off.

Retry as UniVerse SQL When you send an SQL statement to UniVerseODBC, it tries to interpret the statement as if itwere written in the ODBC dialect of SQL. If theReject non-ODBC SQL Syntax option is off,UniVerse ODBC considers certain extensions to bepart of this dialect. If the UniVerse Name Mappingoption is on, UniVerse ODBC considers onlymapped names to be legal in this dialect. If thisprocess of interpretation fails, UniVerse ODBC actsaccording to the Retry as UniVerse SQL option.

When Yes is selected, UniVerse ODBC assumesthat the statement was written in the UniVersedialect of SQL, and passes it through to UniVersewithout modification. It does not apply namemapping nor file access control to the statement.When No is selected, UniVerse ODBC returns anerror. When Server is selected, UniVerse ODBCeither passes the statement to UniVerse or returnsan error, depending on the value of the environ-ment variable HS_RETRY_AS_UV_SQL in theUniVerse ODBC server.

Option Description

Prefetch Size (Rows) This field specifies the number of rows of a resultset that are fetched (or prefetched) from the data-base when one or more unfetched result set rowsare requested. Each block of result set rows fetchedfrom the database when result set rows are neededis called a result set chunk. Each result set chunkcontains Size rows of the result set. Valid values forthis field range from 1 to 32,767.

Page 43: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-11

NLS Options

Threshold (Rows) This field specifies the number of result set rowsthat must be consumed (via calls to SQLFetch)from the current result set chunk before the nextresult set chunk will be prefetched from the server.The Threshold must be less then or equal to theSize. If a threshold that is greater than the size isentered, then UniVerse ODBC will internally adjustthe threshold to be equal to the size when it readsin the values specified. Valid values for this fieldrange from 0 to 32,767.

Max LONG Type Length This field specifies the maximum number of bytesof data per data item that are fetched from the data-base for any SQL_LONGVARCHAR orSQL_LONGVARBINARY type columns. Thisoption is ignored as UniVerse ODBC currently doesnot support the SQL_LONGVARCHAR andSQL_LONGVARBINARY data types.

Fast Connect (Old OTL) This option applies only to UniVerse files that arenot tables. When you select this option, the ODBCTable List is not refreshed in memory, and the FileInformation Cache is read from disk and usedinstead. This option may result in faster connecttimes, but a possibly less up-to-date list of availabletables. This option corresponds to the server envi-ronment variable HS_USE_FILEINFO=YES.

Refresh OTL on Connect This option applies only to UniVerse files that arenot tables. When you select this option, the ODBCTable List is queried. This operation may impactinitial connect time. The File Information Cache isnot updated by this operation. Update the cache byrunning HS.UPDATE.FILEINFO in the UniVerseaccount you are accessing on the server system. Formore information, see “Updating a UniVerseAccount for ODBC Access” on page 4-6.

Option Description

NLS Mapname The name of the map that defines how a character set ismapped between the internal and external character sets. Formore information, see UniVerse NLS Guide.

Option Description

Page 44: UniVerse ODBC Guide

3-12 UniVerse ODBC Guide

Distribute the Configuration FileEach client installing a UniVerse ODBC product or application needs a configura-tion file that references the UniVerse ODBC server system. Use one or more of thefollowing methods to distribute this information to your users:

• Copy your master configuration file to the UniVerse ODBC directory oneach client workstation, either by diskette or by file transfer.

• Merge entries from your master configuration file into a client’s configu-ration file using UniVerse ODBC Config. For more information aboutmerging configuration file entries, see “Merging Configuration Entries” onpage 3-23.

• Install a central configuration file on a networked file server and pointclient users to it. Changes are distributed automatically. For more informa-tion about installing a networked configuration file, see “Sharing aNetworked Configuration File” on page 3-24.

The method you choose depends on whether:

• Clients have similar database access needs.

• Access controls have been administered on a per-database or a per-userbasis. For example, do you need separate user identities, or will a singleuser login suffice?

• The client (or suitable file server) is easily reachable through the network.

After installing a configuration file on a client, you can prevent users from inad-vertently changing it by setting the file attributes to read-only. For moreinformation on setting file permissions, choose Start ➤ Help on the Windowsdesktop and type permissions: files in field 1 on the Index page.

Note: Any time you change the configuration file, make sure to test the changesusing UniVerse ODBC Config before distributing it to your users.

If you have multiple UniVerse ODBC clients on an Ethernet LAN with NFS orNetWare, or that are networked together using Windows networking, you can use

Locale Name The name of a specific set of conventions in various catego-ries that represent the language, character set, and dataformatting conventions used by a group of people. For moreinformation, see UniVerse NLS Guide.

Option Description

Page 45: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-13

a file server to share a single copy of the configuration file among multipleUniVerse ODBC clients. Using a centralized configuration file lets you automati-cally propagate configuration changes to your clients and simplifies adding a newserver to the network.

Removing the UniVerse ODBC Client SoftwareThis section describes how to remove the UniVerse ODBC client software on aWindows client system.

Before removing the UniVerse ODBC installation directory on Windows, makesure that you have a copy of CONFIG.HSC in another location. The UniVerseODBC installation setup program asks you where your UniVerse ODBC configu-ration file resides. It can reside locally on the client or on a network drive that isaccessible by the client. If you are not sure about where your configuration fileresides, see your system administrator.

To remove the UniVerse ODBC client software for Windows:

1. Open the ODBC Data Source Administrator window by double-clicking theODBC icon in the Control Panel.

2. Remove any ODBC data sources that use the Ardent driver:

a. Choose a data source from the User Data Sources (Driver) list and clickRemove.

b. Repeat for each UniVerse data source that appears in the list.

3. Click OK to close the ODBC Data Source Administrator window.

4. Choose Start ➤ Programs ➤ Ardent UniVerse ➤ Uninstall UniVerse ODBC.

5. Follow the instructions in the Uninstall Wizard.

6. Click Finish when the deinstallation process is complete.

Adding Additional UniVerse ODBC ClientsTo add a new UniVerse ODBC client to the network:

1. Set up the TCP/IP configuration on the client so that the client and therequired servers can access each other.

2. Install the UniVerse ODBC client.

Page 46: UniVerse ODBC Guide

3-14 UniVerse ODBC Guide

3. Copy a configuration file containing entries for the required UniVerse ODBCconfigurations to the UniVerse ODBC installation directory.

Note: This step is not necessary if you are sharing a networked configura-tion file.

Using UniVerse ODBC ConfigThis section describes how to use UniVerse ODBC Config window and menucommands to add, change, or delete UniVerse ODBC data source configurations.

You run UniVerse ODBC Config as the last step of any UniVerse ODBC client orserver product installation, so you can test the client/server end-to-end connec-tivity. You can also run UniVerse ODBC Config any time you need to add, modify,or test UniVerse ODBC configurations.

To run UniVerse ODBC Config, choose Start ➤ Programs ➤ Ardent UniVerse ➤UVODBC Config. The UniVerse ODBC Config window appears.

Using the UniVerse ODBC Config WindowThe UniVerse ODBC Config window presents a list of database configurations foryou to change or test. Choose a database name from the list, then choose a menucommand or click one of the buttons on the right.

Page 47: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-15

The following table describes each element of the UniVerse ODBC Configwindow in more detail:

Element Description

Title bar Displays the name and directory location of the configurationfile you are editing.

Menu bar Displays the menu names that let you edit or test a configura-tion, saves the configuration file, or gets online help.

Toolbar Displays icons for frequently used functions.

Status bar Displays system name, user name, and UniVerse account ofthe selected configuration. Also displays descriptions ofmenu options and toolbar buttons.

UV/ODBCConfigurations

Lists the UniVerse ODBC data sources you can configure forclient access.

Setup button Invokes the Configuration Editor to change the configurationof the selected database. You can also press S or double-clickto change a selected entry.

Page 48: UniVerse ODBC Guide

3-16 UniVerse ODBC Guide

Using UniVerse ODBC Config Menu CommandsThe UniVerse ODBC Config menus make it easy to work with configuration files,edit database entries, and test communications configurations. The followingtable is a quick reference:

Test button Tests each server configuration end-to-end to ensure that theclient can access every database listed.

Add button Inserts a new database entry before the selected entry.

Delete button Removes a selected database entry.

Command Description

File ➤ Open Opens an existing configuration file.

File ➤ Save Saves the current configuration file.

File ➤ Exit Exits UniVerse ODBC Config without savingchanges.

Edit ➤ Undo Undoes the previous edit.

Edit ➤ Cut Cuts the selected configuration entry to theClipboard.

Edit ➤ Copy Copies the selected configuration entry to theClipboard.

Edit ➤ Paste Pastes the Clipboard contents as a configurationentry. Reports an error if the data on the Clipboardis not a valid configuration entry.

View ➤ Toolbar Toggles the visibility of the toolbar. This option isselected when the toolbar is visible, and is clearedwhen it is not.

Test ➤ Test SelectedConfiguration

Displays a Test Status window and tests thisconfiguration entry end-to-end for the ability toconnect to the UniVerse ODBC server.

Test ➤ Test AllConfigurations

Sequentially tests all entries in this configurationfile for the ability to connect to the UniVerse ODBCserver.

Element Description

Page 49: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-17

Editing and Testing Database ConfigurationsThis section describes how to edit and test database configurations, how to savetest results, and how to save your changes when finished.

Editing Database ConfigurationsThe UniVerse ODBC Config window lets you edit and test each entry in theCONFIG.HSC configuration file. To edit or test a configuration entry:

1. Choose the entry you want to edit from the UV/ODBC Configurations list.

2. Click Setup, or double-click the highlighted entry. The UniVerse ODBCConfiguration Editor dialog box appears.

3. Edit or test the configuration.

4. Click OK to save the changes and to return to the UniVerse ODBC Configwindow, or click Cancel to return without changing the configuration.

Using the UniVerse ODBC Configuration EditorThe UniVerse ODBC Configuration Editor dialog box appears when you add orchange an entry. Many elements of the database configuration are already filledin. Elements specific to the network link and to the data source appear underServer Connection Information.

Use the following fields and buttons to edit a configuration entry and see resultsof data source configuration tests.

Required EntriesThe following elements of the configuration are required.

Options ➤ Encryptpasswords

Toggles whether passwords are encrypted in aconfiguration. This option is selected when a checkmark appears next to the option, and cleared whenthere is no check mark displayed. Note that pass-word encryption is not supported by UniVerseODBC client software before Version 3.6.

Help ➤ Help Topics Displays a table of contents of all online helptopics.

Help ➤ About UniVerseODBC Config

Displays the version number of UniVerse ODBCConfig.

Command Description

Page 50: UniVerse ODBC Guide

3-18 UniVerse ODBC Guide

UV/ODBC Configuration Name Field. This field specifies the database namethat appears to the user. This name should be something the user recognizeseasily. It must be different from all other database names in the configuration file.

System Name Field. This field specifies the system with the installed UniVerseODBC server.

System Type Field. This field specifies the operating system used on theUniVerse ODBC server system. Choose an operating system from the drop-downlist box.

User Name Field. This field specifies the user name for logging in to the remotehost. The name is case-sensitive on UNIX systems.

For Windows NT servers, use the following format:

domain_name\username

domain_name is either a Windows NT domain name for your login domain or thename of the Windows NT workstation. username is the Windows NT user name.

Page 51: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-19

Password Field. This field specifies the password for logging in to the remotehost (often left blank to force users to enter the password). The password is case-sensitive.

UV/ODBC Server Installation Directory Field. This field specifies the UniVerseODBC server installation directory, which is the directory containingUNIVERSE.TCP. This field is disabled if the system type is Windows NT.

UniVerse Account Pathname Field. This field specifies one of the following:

• The pathname of a UniVerse account• The name of a UniVerse account as defined in the UV.ACCOUNT file• The name of a UniVerse schema as defined in the UV_SCHEMA table

The examples in Table 3-1 show account settings needed to access the SALESdemonstration database.

<uvhome> is the pathname of the UV account directory on your system.

Table 3-1. Account Settings

Database Type Field Contents SALES Account Settings

UniVerse on UNIX path <uvhome>/HS.SALES

UniVerse on Windows NT network_drive:path <uvhome>\HS.SALES

Page 52: UniVerse ODBC Guide

3-20 UniVerse ODBC Guide

Optional EntriesThe following elements of the configuration are optional.

Create Server Debug Log Check Box. This check box specifies an activity log tohelp you debug the configuration.

Inactivity timeout in minutes Field. This field specifies the amount of time inminutes that an inactive UniVerse ODBC server should wait before terminating.The default is 240.

Client check interval in minutes Field. This field specifies the frequency inminutes with which the UniVerse ODBC server checks to see that the UniVerseODBC client application is still running. The default is 5.

REXEC service port number Field. Alter this setting only on the advice ofArdent Customer Support. The default is 512.

Program Field. This field specifies the name of the UniVerse ODBC serverstartup script. The default is UNIVERSE.TCP. Alter this setting only on the adviceof Ardent Customer Support.

Page 53: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-21

Parameters Field. This field controls the operation of the UniVerse ODBC server.Alter this setting only on the advice of Ardent Customer Support.

Ping Button. This button runs a low-level communications test between theclient and server systems. (Note that this is different from the TCP/IP pingcommand.) This test goes to the point where logging in to the host would start,but does not log in. If the test fails, the Ping Status window shows whathappened. For more information, see “Testing UniVerse ODBC Configurations.”

Test Button. This button runs an end-to-end client/server connectivity testbetween the PC and the UniVerse ODBC server. It displays a Test Status windowto show the attempt to connect to the server and the result. For more information,see “Testing UniVerse ODBC Configurations” on page 3-21.

OK Button. This button saves any changes made to this configuration entry.These changes are not saved in the configuration file until you choose File ➤Save.

Cancel Button. This button discards changes made to this configuration entry.

Help Button. This button gets context-sensitive help for the dialog box andrelated operations.

Testing UniVerse ODBC ConfigurationsYou can test the network and UniVerse ODBC connections separately to isolateconnectivity problems. Use Ping to test the network, and Test to test UniVerseODBC server access.

Running the Ping Test. The Ping button runs a low-level communications testbetween the client and host system, stopping at the point where the client systemwould be logging in to the host system.

When the test completes, a small dialog box displays the result of the Ping test.

When you click OK, you return to the UniVerse ODBC Configuration Editordialog box. If the test failed, click Help for more information about trouble-shooting Ping test failures.

Note: If the Ping test succeeds, showing that the network is working properly,do the Server Connect test to verify that the data source is accessible.

Running the Server Connect Test. The Test button runs an end-to-end connec-tivity test between the UniVerse ODBC client and the UniVerse ODBC server. If

Page 54: UniVerse ODBC Guide

3-22 UniVerse ODBC Guide

the configuration entry does not contain sufficient login information to start aserver, UniVerse ODBC Config prompts for them in the Login Information dialogbox.

When you have provided all the information to make a server connection, the teststarts. The Server Connect test performs a network connection, like the Ping test.It goes further than the Ping test because it tests the connection between theUniVerse ODBC client and the UniVerse ODBC server. Click Cancel to terminatethe test before it is complete.

If the test fails, click Help for more information about troubleshooting testfailures.

Click OK to return to the UniVerse ODBC Configuration Editor dialog box.

Note: You must do a Server Connect test on each entry in the configuration fileto ensure access to each of the configured databases.

Saving Test Results. After you run a test, you can save the results by copyingthe screen log to a text editing or word processing application, where you cansave or print the log.

To save the results of a test:

1. Run the test.

2. Type Alt-Print Screen .

3. Switch to a text editing application (such as WordPad) and choose Edit ➤Paste.

4. Choose File ➤ Save to save the test results in a file.

Page 55: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-23

Saving Changes to the Configuration FileWhen all your tests and edits are complete, be sure to choose File ➤ Save beforeyou exit UniVerse ODBC Config to save the changes made to the configurationfile.

Merging Configuration EntriesWhen you add a new data source, the configuration entries you build need to bedistributed to users as appropriate. To do so, you can copy your master configura-tion file to a diskette, from which the required entries can be merged into anexisting configuration file in the client’s UniVerse ODBC directory.

To merge a new configuration entry into an existing configuration file:

1. After installing a new database, use UniVerse ODBC Config to edit yourmaster configuration file to include a new entry for the database, and testaccess to it.

2. Copy the updated master configuration file to a diskette or to the hard disk ofthe client needing access to the database. When copying to the hard disk, usea different name (such as CONFIG.MST) or copy it to a directory other thanthe UniVerse ODBC installation directory so as not to overwrite the previousconfiguration file.

3. Run UniVerse ODBC Config by choosing Start ➤ Programs ➤ ArdentUniVerse ➤ UniVerse ODBC Config. The UniVerse ODBC Config windowappears.

4. Choose File ➤ Open to open the configuration file containing the entry forthe new configuration, and choose Edit ➤ Copy to copy the entry to theClipboard.

5. Choose File ➤ Open to open the existing configuration file in the UniVerseODBC installation directory, select an entry, and then choose Edit ➤ Paste topaste the new configuration entry above the entry you selected.

6. Double-click the new entry and review the communications settings to makesure they are appropriate for this client. If not, change them as necessary.

7. Test UniVerse ODBC access using the Test button. Make sure to correct anyerrors and rerun the test before continuing.

8. If there are other entries in the master configuration file that need to be addedto the configuration file on this client, repeat steps 4 through 7.

9. Choose File ➤ Save to save the changes.

Page 56: UniVerse ODBC Guide

3-24 UniVerse ODBC Guide

Sharing a Networked Configuration FileThis section describes how to share one configuration file with many clients.

PrerequisitesTo share a central configuration file, your client systems must be able to access thenetwork drive where the configuration file is located:

1. Set the CONFIGDIR variable to be the path of the file server directory thatcontains the central configuration file. To define CONFIGDIR, edit theUVODBC.INI initialization file, located in the UniVerse ODBC installationdirectory.

2. Log in to the host and database using the same user name and passwordcombination (and therefore have the same access privileges), or specify logininformation at run time.

In addition, you can set up the configuration file on the file server for read-onlyaccess to prevent users from modifying configurations that could affect others.

This access is provided by Windows networking or add-on networking softwaresuch at NetWare or NFS. For more information on accessing a network drive,choose Start ➤ Help and type network drives in field 1 on the Index page.

Sharing a Configuration FileTo set up a shared configuration file:

1. Select a directory on a system that is accessible from all clients. Make sure thatall clients can connect to this directory as a network drive using WindowsExplorer or Network Neighborhood.

2. Use UniVerse ODBC Config to build a single configuration file that containsthe entries needed by all client systems.

In the UniVerse ODBC Configuration Editor dialog box, under ServerConnection Information do one of the following:

• Enter the user name and password of the login ID that is used to launch aUniVerse ODBC server process when connecting to the data files on thishost.

• Leave the User Name and Password fields blank. UniVerse ODBC promptsfor access information when you attempt to make a connection. Use thisoption if you do not want to store the user name and password in theconfiguration file.

Page 57: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-25

3. Set the permissions on the configuration file to read-only. This prevents usersfrom inadvertently changing configuration files. For more information onsetting file permissions, choose Start ➤ Help and type permissions:files in field 1 on the Index page.

4. Set the CONFIGDIR variable in the UniVerse ODBC initialization file(UVODBC.INI) to the pathname of the directory that contains the configura-tion file. The UniVerse ODBC initialization file is located in the UniVerseODBC installation directory and can be edited with a text editor.

Note: The pathname must include the drive letter for the network drive andthe full pathname of the directory containing the configuration file.

5. Use UniVerse ODBC Config to test access to all entries in the central configu-ration file from this client.

6. Repeat steps 4 and 5 for each client sharing the central configuration file.

ODBC Diagnostic Tool: Dr. DeeBee SpyUniVerse ODBC is delivered with a third-party ODBC diagnostic tool called Dr.DeeBee Spy. Dr. DeeBee Spy monitors activity between ODBC applications anddrivers and keeps a log of the activity. Use this log to track down problems withODBC applications or drivers.

To use Dr. DeeBee Spy, double-click the Dr. DeeBee Spy icon, pick the data sourceto monitor, then run an ODBC-enabled application to monitor. For more informa-tion on using Dr. DeeBee Spy, see “Monitoring Your Configuration” on page 3-25.

Install Dr. DeeBee Spy in the Custom installation section of the UniVerse ODBCclient install process.

Monitoring Your ConfigurationDr. DeeBee Spy monitors activity between ODBC applications and drivers andkeeps a log of the activity. Use this log to track down problems with ODBC appli-cations or drivers.

Two common issues that Dr. DeeBee Spy can address are as follows:

• Many front-end applications report ODBC problems very briefly (forexample, “ODBC call failed”). Near the bottom of the DRDEEBEE.LOG fileyou should see a logged call to SQLError that shows the complete errormessage that the UniVerse ODBC server reported to the front-endapplication.

Page 58: UniVerse ODBC Guide

3-26 UniVerse ODBC Guide

• Some queries appear to run inefficiently and you may be unsure howchanges made to the front-end application affect ODBC SQL. Search theDRDEEBEE.LOG file for calls to SQLPrepare and SQLExecute to see theexact SQL statements that your front end is sending.

Dr. DeeBee Spy is compatible with both ODBC 1.0 and 2.0.

To use Dr. DeeBee Spy:

1. Access Dr. DeeBee Spy by choosing Start ➤ Programs ➤ Dr. DeeBee Spy.

2. A log file called DRDEEBEE.LOG may exist in the WINDOWS directory(Windows 95) or WINNT directory (Windows NT). Choose to overwrite it orappend it.

3. Dr. DeeBee Spy asks for the name of the data source to monitor. Select a datasource, then click OK.

Dr. DeeBee Spy is initialized, then is minimized to an icon. Dr. DeeBee Spyrecords all ODBC calls until it is closed.

4. Start the ODBC-enabled application.

5. Use the ODBC-enabled application to access information through yourselected data source.

This can be done with an automated test script or manually. Dr. DeeBee Spydisplays and records all requests to the ODBC driver.

6. Close Dr. DeeBee Spy.

Page 59: UniVerse ODBC Guide

Installing and Configuring UniVerse ODBC Client 3-27

7. Open the DRDEEBEE.LOG file from the WINDOWS directory (Windows 95)or WINNT directory (Windows NT) to examine the ODBC calls.

The Dr. DeeBee Spy Log FileThe general structure of information captured to the DRDEEBEE.LOG file is asfollows:

ODBC Functionargument value...RETCODE

The left-justified text is the ODBC function called by the application. The totalnumber of indented lines in the captured information matches the total number ofarguments for that function.

For example:

SQLAllocEnv0x01000000SQL_SUCCESS

SQLAllocConnect0x010000000x01010000SQL_SUCCESS

In the first function (SQLAllocEnv ), the driver generated the environmenthandle (phenv, 0x01000000 ) and the return value (SQL_SUCCESS). In the secondfunction (SQLAllocConnect ), the application generated the environmenthandle (henv, 0x01000000 ), and the driver generated the connection handle(phenv, 0x01010000 ) and the return value (SQL_SUCCESS).

Dr. DeeBee Spy resides between the Driver Manager and the driver. Therefore, itcaptures calls to ODBC functions made by the application and calls made solelyby the Driver Manager. After the Driver Manager loads the driver, for example, itcalls SQLGetInfo to determine which version of ODBC the driver supports.

Other methods of monitoring configurations and diagnosing problems includethe SQLTrace feature of the ODBC Data Source Administrator and tracingfeatures built in to a front-end application.

Page 60: UniVerse ODBC Guide

3-28 UniVerse ODBC Guide

Page 61: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-1

4Making UniVerse Data

Accessible toODBC Applications

This chapter describes how to make data in UniVerse tables and files accessible toODBC client programs. You need to do three things:

1. Make UniVerse accounts accessible to ODBC applications.

2. Specify what data in those accounts ODBC applications can access.

3. Present the data in ODBC format.

OverviewThis section gives a general overview of what you need to do to make UniVersedata accessible to ODBC applications. Subsequent sections describe each majorstep in detail.

Making UniVerse Accounts AccessibleODBC applications connect to ODBC data sources. A UniVerse ODBC data sourceis defined as one UniVerse schema or account, although there are ways to makemore than one schema or account accessible through a single UniVerse ODBCconnection. For details about how to make UniVerse schemas and accounts acces-sible, see “Accessing UniVerse Schemas and Accounts” on page 4-3.

Page 62: UniVerse ODBC Guide

4-2 UniVerse ODBC Guide

Making Data in a UniVerse Account AccessibleThe following UniVerse data can be made accessible to ODBC applications:

• Tables, views, and UniVerse files• Columns and fields in tables, views, and UniVerse files• Saved select lists associated with tables, views, and UniVerse files

Tables, Views, and UniVerse FilesUniVerse tables and views are always accessible to ODBC applications, butUniVerse files that are not tables are not. To make UniVerse files accessible toODBC applications, you must run the ODBC file access utility in the account.Among other things, this utility creates the HS_FILE_ACCESS file, which lists allUniVerse files referenced by F- and Q-pointers in the VOC file. You can edit thisfile to define exactly which files should be ODBC-accessible. You probably alsoneed to run the HS.UPDATE.FILEINFO program from time to time, whichupdates the account’s file information cache.

You can also make saved select lists that are associated with a table, view, or filevisible to ODBC applications.

For detailed information about making tables, views, files, and select lists acces-sible, see “Accessing UniVerse Tables, Views, and Files” on page 4-5.

Columns and FieldsYou can make particular columns and fields accessible to ODBC applications. Youcan do this by adding or editing an @SELECT phrase in the dictionary of a table,view, or file. If a UniVerse file contains multivalued data, you may also need toedit other entries in the dictionary that control the behavior of multivaluedcolumns and fields. For detailed information about making columns and fieldsaccessible, see “Accessing Columns and Fields” on page 4-11.

Presenting UniVerse Data in ODBC FormatUniVerse data is organized differently from the way ODBC applications expect itto be organized. Two areas where UniVerse data differs from standard ODBC dataare:

• Data and data types• Multivalued data

Page 63: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-3

Data and Data TypesData in UniVerse files has no data type. ODBC applications, on the other hand,expect all data to be one of several data types. In addition, UniVerse data can be ofvariable length, whereas ODBC expects data to have either a fixed or a maximumlength. To make UniVerse data look more like what an ODBC application expects,you may want to do one or more of the following:

• Run the HS.SCRUB utility in the account• Define SQL data types for data in UniVerse files• Fix data values that cause SQL and ODBC problems• Modify certain UniVerse conversion codes

Details about these can be found in “Modifying UniVerse Data and Data Defini-tions for ODBC” on page 4-14.

Multivalued DataODBC applications expect data to be organized relationally in first normal form(1NF). Although some UniVerse tables, views, and files may be in first normalform, with only one value in each column of each row, many UniVerse tables,views, and files have columns that store multiple values in the columns of a row.

UniVerse ODBC always presents multivalued data to ODBC applications in firstnormal form. UniVerse ODBC automatically normalizes UniVerse tables and filesin order to present their data to ODBC applications in ODBC format. For detailedinformation about how UniVerse normalizes UniVerse data files, see “Multi-valued Columns and Fields” on page 4-11, and “Association Keys” on page 4-19.

Accessing UniVerse Schemas and AccountsUniVerse databases can be organized into:

• UniVerse SQL schemas• UniVerse accounts that are not schemas

A UniVerse ODBC application connects to a UniVerse schema or account and canaccess the tables, views, and files there. The schema or account must be defined asa data source on the client machine using:

• The Windows ODBC Administrator

• UniVerse ODBC Config (on 32-bit Windows systems) or STAR/Config (on16-bit systems)

See Chapter 3 for how to configure UniVerse ODBC data sources.

Page 64: UniVerse ODBC Guide

4-4 UniVerse ODBC Guide

To access other schemas and accounts, you can do three things:

• Use Q-pointers or remote F-pointers. A remote file with a Q-pointer orF-pointer in the VOC of the local account appears as a local file. In UniVerseODBC, Q-pointers and remote F-pointers work only with files, not withtables or views. For information about how to use Q-pointers, see UniVerseSystem Description.

• Use ODBC qualifiers. ODBC qualifiers don’t require you to set upQ-pointers, but they work only on SQL tables and views.

• Use multiple UniVerse ODBC connections, each to a different account.

Note: You cannot access files via UV/Net using UniVerse ODBC.

Using ODBC QualifiersA qualifier is the ODBC equivalent of the name of a UniVerse schema or account.In ODBC SQL you can refer to a remote table as qualifier.tablename. An ODBCconnection has a current qualifier which implicitly qualifies unqualified tablenames.

For ODBC tables derived from UniVerse tables and views, UniVerse ODBC reportsthe UniVerse schema name as the ODBC qualifier.

For ODBC tables derived from UniVerse files, UniVerse ODBC reports the emptystring as the qualifier. To refer explicitly to a UniVerse file in an SQL statement,qualify the ODBC table name with the empty string qualifier. For example:

SELECT * FROM "".MYFILE;

UniVerse ODBC uses two qualifiers:

• The current ODBC qualifier• The local ODBC qualifier

Both the current and the local qualifiers are initially set to:

• The name of the schema to which you are connected• An empty string if the UniVerse account is not a schema

You can change the current qualifier to the name of another schema (or to an emptystring) using the SQL_CURRENT_QUALIFIER option of the SQLSetConnect-Option function. The local qualifier is the name of the UniVerse account to whichthe client is connected and remains constant during the ODBC connection.

Page 65: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-5

Resolving Unqualified ODBC Table NamesUniVerse ODBC uses the following rules when resolving an unqualified ODBCtable name in an SQL statement:

• If the table name occurs in a place in an SQL statement where UniVerseSQL does not allow a qualified table name (such as DROP TABLE),UniVerse ODBC resolves the table name using the local qualifier. An erroroccurs if the SQL statement is a DDL statement and the local account is nota schema, because UniVerse SQL does not allow DDL statements to beexecuted in accounts that are not schemas.

• If the table name occurs in a place in an SQL statement where UniVerseSQL allows a qualified table name, UniVerse ODBC first looks for a filedefined in the local VOC file that matches the ODBC table name.

• If no match is found, and if the current ODBC qualifier is the name of aUniVerse schema (that is, it is not set to the empty string), UniVerse ODBClooks for an SQL table or view in that schema that matches the ODBC tablename.

Accessing UniVerse Tables, Views, and FilesUniVerse schemas can contain:

• SQL tables and views• Files that are not tables or views

UniVerse accounts that are not schemas can contain only UniVerse files that arenot tables or views.

Tables and views are always accessible to ODBC applications, subject to SQL priv-ileges and operating system permissions. To make files that are not tablesaccessible to ODBC applications, you must run the ODBC file access utility. To dothis, choose the Activate Access to Files in an Account option from the UniVerseODBC System Administration menu.

When you run the ODBC file access utility, it creates the HS_FILE_ACCESS file,which lists all UniVerse files referenced by F- and Q-pointers in the VOC file. Thismakes all UniVerse files in the account, except system files such as &DEVICE&,DICT.DICT, APP.PROGS, etc., accessible to ODBC applications. You can edit theHS_FILE_ACCESS file to define exactly which files should be ODBC-accessible(see “File Privileges and Permissions” on page 4-6).

For more information about how UniVerse ODBC modifies an account to make itODBC-accessible, see “What the ODBC File Access Utility Does” on page 4-7.

Page 66: UniVerse ODBC Guide

4-6 UniVerse ODBC Guide

By default UniVerse ODBC applies name mapping to the names of tables, views,and files to make them ODBC-compliant. For more information about namemapping, see “ODBC Name Mapping” on page 4-20.

Updating a UniVerse Account for ODBC AccessIf you make changes to UniVerse files in the account after running the ODBC fileaccess utility and you want the new information to be accessible to UniVerseODBC, you should update the UniVerse ODBC file information cache. Thefollowing changes to UniVerse files require you to update UniVerse ODBC fileaccess in the account:

• Adding, changing, or deleting F- or Q-pointers in the VOC file• Creating or deleting UniVerse files• Defining, changing, or deleting association definitions in file dictionaries• Adding or deleting unassociated multivalued fields to or from a file

To update the UniVerse ODBC file information cache for an account, choose theUpdate File Information Cache in an Account option from the UniVerse ODBCSystem Administration menu. You can also use the HS.UPDATE.FILEINFOcommand to update UniVerse ODBC file access in an account.

File Privileges and PermissionsUniVerse SQL privileges control access to the tables and views in a schema or anaccount. However, they do not provide any kind of access control over UniVersefiles.

Operating system permissions on the files underlying UniVerse tables, views, andfiles also control access to those tables, views, and files.

UniVerse ODBC uses the HS_FILE_ACCESS file, created by the ODBC file accessutility, to control access to UniVerse files. This file controls UniVerse ODBC accessto UniVerse files defined by F- or Q-pointers in the VOC file.

The IDs of records in the HS_FILE_ACCESS file are the names of the files whoseaccess you want to control. Each record has one field, ACCESS, which containsone of the following values:

• READ_WRITE• READ• NONE

These values define the type of access to the file referenced by the record ID.

Page 67: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-7

The HS_FILE_ACCESS file contains a record called HS_DEFAULT that controlsdefault access to all files in the account. When you first run the ODBC file accessutility, it sets the HS_DEFAULT record to READ_WRITE and sets the records forUniVerse system files (APP.PROGS, BASIC.HELP, ERRMSG, UV.ACCOUNT,DICT.DICT, NEWACC, etc.) to NONE (no access). To restrict UniVerse ODBC toread-only access for all files in the account, change the ACCESS field in theHS_DEFAULT record to READ.

If an account does not have an HS_FILE_ACCESS file, UniVerse ODBC denies allaccess to UniVerse files in the account.

Note: You can circumvent the access control provided by the HS_FILE_ACCESSfile by using the native SQL syntax extension to the ODBC SQL grammaror by reparsing. These mechanisms allow SQL statements and UniVersecommands to be passed directly to UniVerse, bypassing UniVerse ODBC.For more information see “Executing UniVerse SQL”on page A-12.

What the ODBC File Access Utility DoesWhen you run the ODBC file access utility in an account, it does the following:

• Creates the HS_FILE_ACCESS file• Writes an @EMPTY.NULL X-descriptor in all UniVerse file dictionaries• Writes S or M in field 5 of A- and S-descriptors• Updates dictionary entries defined for earlier versions of HyperStar• Creates Q-pointers for multiple data files• Creates the file information cache• Updates the UV.ACCOUNT file

File Information CacheWhen you run the ODBC file access utility, UniVerse ODBC scans the dictionariesof all nonsystem files in the account and stores the information in a file informa-tion cache. The UniVerse ODBC server uses this cache to provide ODBCapplications with a list of accessible ODBC tables without having to construct thisinformation at run time, thus improving performance.

CAUTION: The file information cache is for UniVerse ODBC internal use onlyand should not be modified. Any changes to the cache cause unpre-dictable behavior and can make all UniVerse files in the accountinaccessible to UniVerse ODBC.

Page 68: UniVerse ODBC Guide

4-8 UniVerse ODBC Guide

To control how the server uses the file information cache, use the Fast Connect(Old OTL) or the Refresh OTL on Connect option on the UniVerse ODBC DataSource Setup menu of the UniVerse ODBC Administrator.

• Choose Fast Connect (Old OTL) (the default setting) if you want the serveralways to use the file information cache to construct the list of availableODBC tables. If the server cannot access the cache, it constructs the ODBCtable information from scratch at connection time.

• Choose Refresh OTL on Connect if you want the server to construct theODBC table list from scratch at connection time, ignoring the cache. Theadvantage of this mode is that the list of accessible ODBC tables is more upto date. The disadvantage is that initial connection time can be significantlyincreased for an account containing many files. Responses to subsequentrequests for dictionary information are faster.

If you are using a version of the UniVerse ODBC client earlier than Release 3.6(that is, the STAR/ODBC FP client 3.0 or 3.0.x), these options are not available.You need to set the server’s HS_USE_FILEINFO environment variable to one ofthe following values:

Note: This environment variable has no effect on Release 3.6 (or later) UniVerseODBC clients.

Upgrading Accounts from Previous UniVerse ODBC ReleasesWhen you use the Activate Access to Files in an Account option, it upgrades theaccount from previous (non-FP) UniVerse ODBC server releases. All configurationinformation is preserved so that both UniVerse ODBC servers are operational.

Value Equivalent to…

YES (default) Fast Connect (Old OTL)

NO Refresh OTL on Connect

no value1

1. Possible only on UNIX systems where HS_USE_FILEINFO is not set in hs_environ nor inthe user’s environment.

Refresh OTL on Connect

Page 69: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-9

Tables 4-1 and 4-2 illustrate how accounts and files from previous UniVerse ODBCserver releases are updated. Table 4-1 lists the VOC entries affected by the upgradeprocedure.

Table 4-2 lists the dictionary entries affected by the upgrade procedure.

Table 4-1. Nonserver VOC Entries

VOC Entry Description Upgrade Processes

HYPERFILES Files accessible to UniVerseODBC.

For each file listed, anHS_FILE_ACCESS entry iscreated with access set toREAD_WRITE. The defaultfile access is set to NONE.

HYPERLISTFILT Matches patterns to filterwhich select lists are visibleto UniVerse ODBC.

Ignored.

HYPER.ODBC.TEXT.MULT Multiplication factor forcalculating the ODBCdisplay width on text fields.

Ignored.

Table 4-2. Nonserver DICT Entries

DICT Entry Description Upgrade Processes

@HYPERFIELDS Fields accessible to UniVerseODBC.

Copied to @SELECT entry.

@HYPER.SEARCH.FIELDS Fields searchable byUniVerse ODBC.

Ignored. All UniVerseODBC-accessible fields aresearchable.

@HYPER.UPDATE.FIELDS Fields updatable byUniVerse ODBC.

Ignored. All UniVerseODBC-accessible noncom-puted (stored) fields areupdatable.

HYPER.ODBC.ALIAS Map of file, association, andfield names to aliases.

Ignored. Name mapping isdone automatically by theUniVerse ODBC serverwithout provision for user-specified aliases.

HYPER.ODBC.KEYS.name Key fields in an associationor unassociated multi-valued field.

Copied to the@ASSOC_KEY.mvnameentry.

HYPER.ODBC.LISTS Select list names associatedwith this file.

Copied toHS.ODBC.LISTS.

HYPER.ODBC.TEXT.MULT Multiplication factor forcalculating ODBC displaywidth on text fields.

Ignored.

Page 70: UniVerse ODBC Guide

4-10 UniVerse ODBC Guide

Accessing Saved Select ListsUniVerse ODBC makes saved select lists accessible to ODBC applications. AnODBC application sees a select list as a virtual table with a name in the followingformat:

filename_listname

To make a saved select list accessible to UniVerse ODBC, the following conditionsmust be met:

• The select list must be saved in the &SELECTLISTS& file of the localaccount.

• The name of the select list must be included in an X-descriptor calledHS.ODBC.LISTS in the dictionary of a table, view, or file.

– A table or view associated with the select list must reside in the localschema.

– A file associated with the select list can be local or remote—that is, it canbe referenced by an F- or a Q-pointer in the VOC file.

The HS.ODBC.LISTS X-descriptor has the following format:

HS.ODBC.LISTS0001 X0002 LIST1 LIST2 LIST3 ...

Choose your lists carefully. If one table, view, or file has n associations, unassoci-ated multivalued fields, or both, and if it also has m select lists, ODBCapplications see (n + 1) * (m + 1) virtual tables for that one table, view, or file. Forexample, if the file MYTABLE has the associations MYASSOC1 and MYASSOC2and the unassociated multivalued field MV1, and if the HS.ODBC.LISTS entryhas the lists MYLIST1 and MYLIST2 in field 2, the following ODBC tables wouldappear in the result set of SQLTables:

MYTABLEMYTABLE_MYLIST1MYTABLE_MYLIST2MYTABLE_MYASSOC1MYTABLE_MYASSOC1_MYLIST1MYTABLE_MYASSOC1_MYLIST2MYTABLE_MYASSOC2MYTABLE_MYASSOC2_MYLIST1MYTABLE_MYASSOC2_MYLIST2MYTABLE_MV1

Page 71: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-11

MYTABLE_MV1_MYLIST1MYTABLE_MV1_MYLIST2

By default, UniVerse ODBC applies name mapping to the names of select lists tomake them ODBC-compliant. For information about name mapping, see “ODBCName Mapping” on page 4-20.

Accessing Columns and FieldsThis section describes what columns and fields are accessible to ODBC, and howto make multivalued columns and fields accessible.

ODBC-Accessible Columns and FieldsFor any table, view, or file, the columns and fields accessible to ODBC are thosereturned by the following SELECT statement, executed in NF2 mode:

SELECT * FROM tablename

For tables and views, accessible columns are those listed in the @SELECT phrase,if it exists. If there is no @SELECT phrase, the columns are those listed in thetable’s SICA, as defined by CREATE TABLE or CREATE VIEW, and as modifiedby ALTER TABLE.

For files that are not tables, accessible fields are those listed in the @SELECTphrase, if it exists. If there is no @SELECT phrase, the fields are those listed in the@ phrase. If neither the @SELECT nor the @ phrase exist, only the record ID isaccessible.

Note: An @ phrase in the dictionary of a table or view is ignored.

For more information about the @SELECT and @ phrases, see UniVerse SQLAdministration for DBAs.

By default UniVerse ODBC applies name mapping to the names of columns andfields to make them ODBC-compliant. For information about name mapping, see“ODBC Name Mapping” on page 4-20.

Multivalued Columns and FieldsUniVerse tables and files can contain any mix of the following:

• Single-valued columns or fields

• Multivalued columns or fields not associated with any other columns orfields

Page 72: UniVerse ODBC Guide

4-12 UniVerse ODBC Guide

• Multivalued columns or fields associated with other multivalued columnsor fields

UniVerse ODBC shows UniVerse tables, views, and files in first normal form. Thatis, a table, view, or file containing one or more multivalued columns or fields istreated as a set of ODBC tables comprising:

• One table that includes all single-valued columns or fields• One table for each association of multivalued columns or fields• One table for each unassociated multivalued column or field

To make multiple values in a column or field accessible to ODBC applications, thecolumn or field must be defined as multivalued in one of the following ways:

• By the CREATE TABLE, ALTER TABLE, or CREATE VIEW statement thatdefined the column

• By an M in the SM field of the dictionary definition (field 6 in D- andI-descriptors, field 5 in A- and S-descriptors)

• By a C or D in field 4 of the dictionary definition in A- and S-descriptors(Pick-style associations)

Note: If UniVerse ODBC finds multivalued data in a field defined as single-valued, only the first value in the field is accessible to ODBC.

If an A- or S-descriptor does not have an M or an S in field 5, the UniVerse ODBCfile access utility samples the data in the field, and if it finds multivalued data andcan write to the file dictionary, it defines the field as multivalued.

Certain ODBC tables are not visible to the SQLTables function, even though theyare accessible through SQL statements. Some ODBC applications provide limitedor no access to ODBC tables that are not visible to SQLTables. SQLTables can seethe following:

• In UniVerse tables and views, all associations and unassociated multi-valued columns defined by the CREATE TABLE, ALTER TABLE, andCREATE VIEW statements

• In UniVerse files, all associations and unassociated multivalued columns

• In UniVerse files, all Pick associations whose controlling field is visible toSQLTables

Page 73: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-13

ExampleConsider a UniVerse file MYFILE comprising the following fields:

The dictionary contains a phrase defining the association of fields 3 and 4:

LINEITEMS0001 PH0002 QTY DESCRIPTION

The field descriptors for QTY and DESCRIPTION specify LINEITEMS in field 7.

The dictionary also contains the following @ phrase:

@0001 PH0002 CUSTOMER ADDRESS QTY DESCRIPTION

All fields of this file are accessible to ODBC applications. The @ID field is notincluded in the @ phrase because it is always accessible unless suppressed by theID.SUP keyword.

UniVerse ODBC presents this file as three tables:

Field Name LocationSingle or

Multivalued Associated

@ID 0 S No

CUSTOMER 1 S No

ADDRESS 2 M No

QTY 3 M Yes

DESCRIPTION 4 M Yes

ODBC Table ODBC Columns

MYFILE @ID CUSTOMER

MYFILE_ADDRESS @ID CUSTOMER ADDRESS @ASSOC_ROW1

1. System-generated. @ASSOC_ROW appears automatically for any association or unasso-ciated multivalued column or field, unless the dictionary contains an@ASSOC_KEY.mvname X-descriptor that defines an association key. See “AssociationKeys” on page 4-19.

MYFILE_LINEITEMS @ID QTY DESCRIPTION @ASSOC_ROW1

Page 74: UniVerse ODBC Guide

4-14 UniVerse ODBC Guide

If name mapping is on, @ID appears as Z_ID and @ASSOC_ROW appears asZ_ASSOC_ROW. For information about name mapping, see “ODBC NameMapping” on page 4-20.

Modifying UniVerse Data and Data Definitionsfor ODBCThis section describes things you may need to do to make particular kinds of dataaccessible to ODBC applications:

• Fix data in data files and dictionaries that cause SQL and ODBC problems• Define SQL data types for data in UniVerse files• Define the length of character string data in UniVerse files• Modify certain UniVerse conversion codes

Validating Tables and Files for ODBC ClientsUse the HS.SCRUB utility to scan data in a table or UniVerse file and fix data fileand dictionary problems that cause SQL and ODBC difficulties. The HS.SCRUButility does the following:

• Reports table and UniVerse file anomalies• Saves a select list of record IDs of problem records• Adjusts dictionary entries to accommodate bad data1

• Adds an @EMPTY.NULL record to the dictionary• Adds an @SELECT record to the dictionary• Fixes the data in the file, optionally saving a copy of the original file

@EMPTY.NULL. HS.SCRUB adds an @EMPTY.NULL record to the table or filedictionary if all the following conditions are met:

• The dictionary does not already include an @EMPTY.NULL record• The data contains empty values• Modification of the dictionary is enabled (FIX, AUTOFIX, AUTOFIX DICT)

For information about empty-null mapping, see “Empty or Unconvertible Data”on page 4-18.

1. Such as nonnumeric values in numeric, date, and time fields, which can lead toadjusting the column type to CHARACTER.

Page 75: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-15

@SELECT. HS.SCRUB adds an @SELECT record to the file dictionary (but not toa table dictionary) if both of the following conditions are met:

• The dictionary does not already include an @ or @SELECT record• Modification of the dictionary is enabled (FIX, AUTOFIX, AUTOFIX DICT)

For information about @SELECT records, see UniVerse SQL Administration forDBAs.

Running HS.SCRUB. To run the HS.SCRUB utility, enter 5 to choose RunHS.SCRUB on a File/Table from the UniVerse ODBC System Administrationmenu, or use the HS.SCRUB command.

If you use the Run HS.SCRUB on a File/Table option, you are prompted to entereither the full pathname of the UniVerse account (for Windows NT, start with thedrive letter, for example D:) or the account name as listed in the UV.ACCOUNTfile. Press Enter to see a list of UniVerse accounts in which file access has alreadybeen activated.

Next you are prompted to enter the name of the table or file you want to analyzeor change. When you enter a filename, you are prompted to enter the mode ofoperation. Enter one of the following at the Mode prompt:

• Press Enter to generate a report without modifying the table or file.• FIX• AUTOFIX• AUTOFIX DICT• AUTOFIX DATA

See the next section for a description of these modes.

Using the HS.SCRUB Command. The syntax of the HS.SCRUB command is asfollows:

HS.SCRUB filename [FIX | AUTOFIX [DICT | DATA]]filename is the UniVerse file or table to be analyzed.

FIX puts HS.SCRUB in interactive mode, in which you are prompted to resolve anyanomalies following the analysis.

AUTOFIX puts HS.SCRUB in automatic mode; anomalies are corrected with thedefault action that would have been presented to the user. If you don’t specifyDICT or DATA with the AUTOFIX option, HS.SCRUB resolves anomalies in boththe data file or table and its dictionary.

Page 76: UniVerse ODBC Guide

4-16 UniVerse ODBC Guide

DICT indicates that HS.SCRUB resolves only those anomalies associated with thefile’s or table’s dictionary.

DATA indicates that HS.SCRUB resolves only those anomalies associated with thefile’s or table’s data.

When neither FIX nor AUTOFIX is specified, HS.SCRUB only reports anomalies.No data or dictionary items are modified.

SQL Data TypesTo fine-tune or define data type, length, precision, and scale values for fields andI-descriptors in files, you must edit the DATATYPE field of the correspondingdictionary entry (field 8 in D- and I-descriptors, field 6 in A- and S-descriptors).This is especially important for character data, in which the display width definedin the dictionary may be much larger or smaller than the largest data values in thefile. The HS.SCRUB utility can automatically make these adjustments based on thedata found.

For UniVerse files, UniVerse determines a field’s SQL data type by examining itsconversion code and format specifications. The UniVerse ODBC server reports thisSQL data type to ODBC applications. If the UniVerse-generated SQL data type isinappropriate for the actual data in the field, you can specify the correct SQL datatype in the field’s dictionary entry. For some data types, the SQL data type syntaxis different between dictionary specifications and UniVerse SQL statements (forexample, CREATE TABLE) as noted in Table 4-3. Square brackets indicate optionalparameters.

Note the syntactic differences regarding the use of parentheses and commas.

The DATE, DOUBLE PRECISION, INT[EGER], REAL, SMALLINT, and TIMEdata type syntax is identical for dictionaries and UniVerse SQL.

Table 4-3. SQL Data Type Syntax

Dictionary Syntax UniVerse SQL Syntax Notes

CHAR[ACTER][,n] CHAR[ACTER][(n)] n = number of characters

DEC[IMAL][,p[,s]] DEC[IMAL][(p[,s])] p = precision s = scale

FLOAT[,p] FLOAT[(p)] p = precision

NUMERIC[,p[,s]] NUMERIC[(p[,s])] p = precision s = scale

VARCHAR[, n] VARCHAR[(n)] n = number of characters

Page 77: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-17

You can specify the SQL data type for any field, real or virtual, in a UniVerse file.You need not specify the SQL data type for any column of a table or view definedby the CREATE TABLE or CREATE VIEW statement, but you may want to specifythe SQL data type for other columns in the table or view (such as I-descriptors) thatare not defined in the SICA. You cannot modify the SQL data type for columnsdefined in the SICA, and UniVerse ignores the dictionary definitions for thesecolumns. For more information about the SICA and UniVerse SQL tables andviews, see UniVerse SQL Administration for DBAs and UniVerse SQL User Guide.

Length of Character DataIn ODBC, every character column has either a fixed length or a maximum length.This column length is called its precision.

The precision of a character column is determined from one of the following:

• For a column defined by a CREATE TABLE or ALTER TABLE statement,the precision is defined by the column definition, which is stored in thetable’s SICA.

• For a column in a view, the precision is defined by the CREATE VIEWstatement or by the precision of the column specified by the SELECT state-ment that creates the view.

• For a column not defined by the CREATE TABLE or ALTER table statement(such as an I-descriptor), or for a field in a UniVerse file, the precision isdefined by the data type specified in the DATATYPE field of the field’sdictionary definition. If the DATATYPE is not defined, the FORMAT fieldof the dictionary defines the precision.

The actual number of characters in a UniVerse character column can be greaterthan its precision. UniVerse ODBC retrieves such extra characters, up to a limit.The number of bytes of character data that UniVerse ODBC retrieves from a char-acter column is the smallest of:

• The number of bytes of data the column actually contains.

• 255, or four times the column’s precision, whichever is greater.

• The value of the ODBC statement option SQL_MAX_LENGTH, if it hasbeen set.

• The number of bytes of data that UCI can fetch. This is controlled by theODBC configuration parameters MAXFETCHBUFF and MAXFETCH-COLS, defined in the uvodbc.config file.

Page 78: UniVerse ODBC Guide

4-18 UniVerse ODBC Guide

If your fetch buffer isn’t big enough to hold all the character data that UniVerseODBC retrieves, UniVerse ODBC fills your buffer and generates a truncationwarning.

The actual number of characters in a UniVerse character column can be less thanits precision: unlike some DBMSs, UniVerse does not automatically pad CHAR(n)columns on the right with spaces. If you insert the value "abc " (with two trailingspaces) into a CHAR(10) column, the column contains only five characters, not 10.

Your application and data source must agree on a consistent way to treat trailingspaces in a CHAR(n) column. Generally it is better to treat CHAR(n) columns as ifthey were VARCHAR columns with no space padding.

Empty or Unconvertible DataThe UniVerse ODBC server provides mechanisms for handing empty values(empty strings) and unconvertible data (dirty data).

Empty-Null MappingUniVerse files use empty strings in much the same way tables use null values.Unfortunately, empty strings in numeric or date columns cause data conversionerrors in ODBC, making these columns almost inaccessible to many ODBC appli-cations. To make files with empty values accessible to ODBC, the UniVerse ODBCserver provides empty-null mapping, converting empty values in UniVerse files tonull values in ODBC application buffers, and vice versa.

To turn on empty-null mapping for a UniVerse table or file, add an X-descriptornamed @EMPTY.NULL to the dictionary. To turn off empty-null mapping, deletethe @EMPTY.NULL entry from the dictionary.

Note: The Activate Access to Files in an Account option enables empty-nullmapping in all files in the account by creating @EMPTY.NULL dictionaryentries.

If empty-null mapping is not enabled, UniVerse ODBC does the following:

• Returns empty strings from empty character columns

• Translates empty strings in numeric or date columns to null values andreturns them with a warning (SQL_SUCCESS_WITH_INFO)

If empty-null mapping is enabled, UniVerse ODBC assumes the user wants allempty strings in all columns to be returned as null values and therefore does notgenerate a warning.

Page 79: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-19

Dirty DataDirty data such as nonnumeric or out-of-range values in a numeric column isunconvertible. Dirty data is tolerated without modifying the data or causing a run-time error to ODBC applications. When UniVerse ODBC encounters a dirty datavalue, it returns it as the null value along with a warning(SQL_SUCCESS_WITH_INFO).

Conversion CodesWhen you insert or update a value in a column whose definition specifies aconversion code, the value is inserted without converting it, whether or not thevalue satisfies the conversion code. Subsequent SELECT statements, however,may not find such a value because UniVerse applies the conversion code to it andreturns an empty string or some other unexpected value. This can occur with thefollowing conversion codes among others:

• G (Group Extraction)• L (Length)• P (Pattern Match)• R (Range)• S (Substitution)

To avoid this problem, restrict your conversion codes to those that are essential. Toenforce patterns on input values in tables, use a CHECK constraint.

Association KeysUniVerse tables and views have primary keys. UniVerse files have record IDs.Primary keys and record IDs are unique identifiers for each row (record) of datain a table or file.

Since UniVerse ODBC shows associations and unassociated multivalued fields asODBC tables, they too require a set of unique identifiers that serve as primarykeys. These keys are called association keys.

You can define one or more association columns as the association key, but youdon’t have to. If you do not, UniVerse SQL generates a virtual column called@ASSOC_ROW containing unique values that, combined with the primary keysor record IDs of the base table, become the association keys for the ODBC tablegenerated from the association.

The @ASSOC_ROW column can have either stable or unstable characteristics. Astable key allows an association to be managed as a static array of values without

Page 80: UniVerse ODBC Guide

4-20 UniVerse ODBC Guide

compaction (such as an association row representing a quarter, month, or day).An unstable key allows an association to be managed as a dynamic array withcompaction (for example, names of multiple customer contacts and phonenumbers).

Note: Even if you specify @ASSOC_ROW in the @SELECT or @ phrase, itappears as a column or field only in an ODBC table generated from thebase table, view, or file. It does not appear as a column in the base table.

Defining Association KeysIf a table has any associations or unassociated multivalued columns (such asI-descriptors) that were not defined by CREATE TABLE or ALTER TABLE, youcan define association keys for them in two ways:

• Using the ASSOC clause of the CREATE TABLE or ALTER TABLEstatement

• By adding an X-descriptor called @ASSOC_KEY.mvname to the table or filedictionary

For detailed information about defining association keys, see UniVerse SQLAdministration for DBAs and UniVerse SQL Reference.

Note: If you use the @ASSOC_KEY.mvname dictionary entry to define an associa-tion key, UniVerse enforces uniqueness on the combination of this key withthe record ID for SQL INSERT and UPDATE statements. This means thatattempts to update an association row fail if other rows contain the samerecord ID and association key values, even if you are not changing the keyvalue as part of the update. To avoid this problem, make sure that anycolumn or field you define as an association key has unique values withineach record in the UniVerse file.

ODBC Name MappingODBC requires that table and column names begin with a letter, followed by eitherletters, digits, or underscores (see Microsoft ODBC 2.0 Programmer’s Reference,Appendix C, “SQL Grammar”).

Most UniVerse databases have file names, column names, and field names that donot conform to ODBC naming rules. Periods (.) are the most commonly usedillegal characters. Several key ODBC client applications, including PowerBuilder

Page 81: UniVerse ODBC Guide

Making UniVerse Data Accessible to ODBC Applications 4-21

and all Microsoft products (such as Access, Visual Basic, and Visual C++) that usethe Jet database engine, reject periods in identifiers.

To make UniVerse data accessible to UniVerse ODBC, offending file names,column names, and field names are translated to conform to ODBC naming rules.The key features of name mapping are as follows:

• Βy default, name mapping is in effect to ensure that any UniVerse files,columns, and fields are ODBC-accessible.

• Name mapping can be controlled either on the client or on the server. Theclient determines whether name mapping is controlled by the client or theserver. See the UniVerse Name Mapping option on page 3-10 for moreinformation.

On the server, the environment variable HS_NAME_MAPPING controlsname mapping. This variable is initially set to YES for all UniVerse ODBCserver invocations. To deactivate name mapping on the server, setHS_NAME_MAPPING to NO. If no HS_NAME_MAPPING variable is setin the environment, name mapping is YES by default. For more informa-tion about ODBC environment variables, see Appendix C.

• Once a UniVerse ODBC connection maps a UniVerse file, column, or fieldname to comply with ODBC, that mapping remains for the duration of theconnection, even if the object is deleted and recreated. This preventsUniVerse ODBC from unexpectedly renaming an object.

• When name mapping is off, you can use non-ODBC compliant identifiersas long as they are delimited by double quotation marks in SQL statements.

The following algorithm translates names to conform to the ODBC 2.0 specifica-tion for user-defined names:

• Z_ is prefixed to names beginning with a digit.

• Z is prefixed to names beginning with an underscore or an ODBC-illegalcharacter such as @.

• ODBC-illegal characters are converted to underscores throughout thename.

• Names are truncated to 120 characters.

If these transformations cause two or more names to conflict within a name space,unique numbers in the following format are appended to the names to distinguishthem:

_n

Page 82: UniVerse ODBC Guide

4-22 UniVerse ODBC Guide

The sequence number n is a decimal integer, up to seven digits long.

Name mapping is not applied in the following cases:

• When SQL statements or UniVerse commands are executed by theUniVerse ODBC native syntax extension, as described in “The {NATIVE}Syntax Extension” on page A-12.

• When retrying as UniVerse SQL. See “Retrying Statements as UniVerseSQL” on page A-13.

Page 83: UniVerse ODBC Guide

Troubleshooting 5-1

5Troubleshooting

This chapter describes how to isolate common operational problems and how tocollect the pertinent information. It also contains checklists for troubleshootingUniVerse ODBC server and client products.

Isolating a ProblemMost installation and operation difficulties with UniVerse ODBC fall into one ofthe following categories:

• UNIX or Windows NT operating system configuration• PC hardware or software configuration• UNIX or Windows NT security, permissions, quotas, or disk space• Nonfunctioning communications paths

If a client encounters a problem accessing the server, first try to access the serverfrom a similarly configured client system that is working. Many problems arecommunications-related, so isolating them to the client or server is important.

For Windows clients, use the UniVerse ODBC Config Ping and Test buttons toverify network and database access, respectively.

If Ping fails, the problem is communications-related, and you should examinewhether other applications external to UniVerse ODBC (or even external toWindows) are visible to the server. Terminal emulators and FTP utilities should bechecked to see if they fail similarly. For more information, see “Manual Commu-nications Verification” on page 5-5.

If Ping succeeds but Test fails, the problem is most likely on the server or in theconfiguration entry. Examine the configuration carefully. Correct any problemsyou find, then retry the test.

Page 84: UniVerse ODBC Guide

5-2 UniVerse ODBC Guide

Because the UniVerse ODBC server expects to communicate to a UniVerse ODBCclient using a defined protocol, you cannot start the server interactively from aterminal to see if it is working properly. Use UniVerse ODBC Config to trace theserver connection process.

If the problem appears to be server-related, create a server debug log (seepage 3-20) and retry the connection. For more information about the serverprocess log, see Appendix D.

Before Reporting a ProblemBefore you report a UniVerse ODBC problem, you need relevant informationabout your system. This includes the information provided in “Product Support”in the Preface.

Getting Information About Your SystemThis section describes how to find the information you may need for problemdiagnosis or assistance. Tables 5-1 and 5-2 itemize the UNIX and Windows NTserver information you may need. The Action column provides detailed proce-dures for getting the information.

Table 5-1. Server Information for UNIX

Item Action

UniVerse ODBC serverversion number

Change directory to the UV account directory andenter uvosrv –v.

UNIX version number Enter uname –a at the UNIX prompt.

UniVerse version number Enter .L RELLEVEL at the UniVerse prompt.

Is the UNIX exec servicerunning?

Enter ps –e | grep inetd to report exec /etc/services.

Is the UniRPC daemonrunning?

Enter ps –ef | grep unirpcd or ps –aux | grepunirpcd, depending on your system.

TCP/IP host name of theUNIX server

Enter hostname at the UNIX prompt.

Contents of the UVaccount directory, andpermissions on them

Change directory to the UV account directory andenter ls –l > logfile to write the permissions settingsto a file.

Page 85: UniVerse ODBC Guide

Troubleshooting 5-3

Contents of the UVaccount directory, andpermissions on them

Change directory to the UV account directory andenter ls –l > logfile to write the permissions settingsto a file.

Contents of the unishareddirectory, and permis-sions on them

Change directory to the unishared directory andenter ls –l > logfile to write the permissions settingsto a file.

Contents of the unirpcdirectory, and permis-sions on them

Change directory to the unirpc directory and enterls –l > logfile to write the permissions settings to afile.

Disk usage of the UVaccount directory

Enter du UV.account.dir.UV.account.dir is the directory path where UniVerseis installed.

Available disk space onthe file system whereUniVerse is installed

Enter df filesystem on that file system.filesystem is the name of the UNIX file system thatyou are checking.

Table 5-2. Server Information for Windows NT

Item Action

UniVerse ODBC server versionnumber

Choose Help ➤ About… from the menuof a connected UniVerse ODBC client.

Windows NT version number Enter WINMSD in the Run dialog box.Click the Version tab.

UniVerse version number Enter.L RELLEVEL at the UniVerseprompt.

Is UniVerse running? Try to use telnet to reach the Windows NThost name. From the Windows NTControl Panel, choose Services. Verifythat UniVerse is in the list of installedservices and the status is Started.

Is the UniVerse ODBC remote execu-tion service running?

Choose Services from the Windows NTControl Panel. Verify that UniVerseREXEC is in the list of installed servicesand the status is Started.

Table 5-1. Server Information for UNIX (Continued)

Item Action

Page 86: UniVerse ODBC Guide

5-4 UniVerse ODBC Guide

Table 5-3 itemizes the Windows client information you may need. The Actioncolumn provides detailed procedures for obtaining each item of information.

Is the UniRPC Service running? Choose Services from the Windows NTControl Panel. Verify that UniVerseUniRPC is in the list of installed servicesand the status is Started.

TCP/IP host name of the WindowsNT server

Enter hostname at the MS-DOS prompt.

Contents of the UV account direc-tory, and permissions on them

Use the Windows NT Explorer.

Contents of the unishared directory,and permissions on them

Use the Windows NT Explorer.

Contents of the unirpc directory, andpermissions on them

Use the Windows NT Explorer.

Available disk space on the filesystem containing UniVerse

Use the Windows NT Explorer.

Disk usage of the UV accountdirectory

Use the Windows NT Explorer.

Table 5-3. Client Information for Windows NT or Windows 95

Item Action

UniVerse ODBC client versionnumber

Choose Help ➤ About UniVerse ODBCConfig… from the UniVerse ODBCConfig window.

Configuration file entry on whichthe problem occurred

Check the configuration file on the clientand the CONFIGDIR entry in the initial-ization file.

PC processor type and clock speed Choose System from the Control Panel,then click the General tab.

PC main and extended memory size Choose System from the Control Panel,then click the Performance tab.

Windows version Choose System from the Control Panel,then click the General tab.

Type of Ethernet card installed Look at the vendor documentation.

Table 5-2. Server Information for Windows NT (Continued)

Item Action

Page 87: UniVerse ODBC Guide

Troubleshooting 5-5

Make sure you have copies of the following files ready when you call:

• CONFIG.HSC from the Windows client• log.comms.yymmdd.hhmmss.pid obtained using the –d or –D parameter

For diagnostic purposes it may also be necessary to get copies of the followingfiles at the time of the failure.

For UNIX only:

• .profile, .login, and .cshrc (or other environment files) files for the user• hs_environ file• /etc/services file• /etc/inetd.conf file• /etc/rc* files• ps –aux or ps –ef output file

For Windows NT only:

• \WINNT\SYSTEM32\DRIVERS\etc\HOSTS file• \WINNT\SYSTEM32\DRIVERS\etc\LMHOSTS file• \WINNT\SYSTEM32\DRIVERS\etc\SERVICES file• \WINNT\SYSTEM32\DRIVERS\etc\NETWORKS file• C:\Ardent\UVODBC\UVODBC.INI file (or environment variable

settings)• C:\WINNT\VSL.INI file• C:\WINNT\WIN.INI file• C:\CONFIG.SYS and C:\AUTOEXEC.BAT files• The client TCP/IP software HOSTS file (if used)• The contents of the UniVerse ODBC client installation directory (usually

C:\Ardent\UVODBC), with file sizes and dates

Manual Communications VerificationUniVerse ODBC Config is usually all that is needed to configure and validateUniVerse ODBC client access to a UniVerse ODBC server. However, if you are

Pathname of the UniVerse ODBCclient installation directory

Use the Windows Explorer (usually<drive>:\Ardent\UVODBC).

PATH environment variable value Choose System from the Control Panel,then click the Environment tab.

Table 5-3. Client Information for Windows NT or Windows 95 (Continued)

Item Action

Page 88: UniVerse ODBC Guide

5-6 UniVerse ODBC Guide

having difficulties, you can use manual procedures to further diagnose communi-cations difficulties, as described in the following sections.

Verifying a TCP/IP ConnectionTCP/IP products typically provide several utilities to verify connectivity betweenthe client and the server. Consult the documentation for your TCP/IP softwarefor detailed instructions for performing the following checks.

To verify a TCP/IP connection, use ping or telnet.

PingProvide the host name. The ping program looks up the host name in the localhosts file or in a name server and sends one or a series of low-level messages tothe host, which echoes them back.

If using ping with the host name does not work, you can use ping with the IPaddress of the host. If the IP address works but the host name does not, either thelocal hosts file or the name server in use does not know the host by the name youare using. Check the spelling and capitalization (host names are case-sensitive).

If using ping with the IP address does not work to a system that is known to beavailable, you may have the wrong IP address, or there may be gateways in theEthernet path between your client and the server that are not passing yourrequests. In this case, you need to get help from your system administrator.

If ping works, you have verified that the TCP/IP software has been installed andconfigured correctly, and the host name you used is valid (you still do not know ifit is the host you want). Do not proceed until ping works.

TelnetProvide the host name, then log in with a user name and password to an interac-tive host terminal session. For information about how to use the telnet utility, seeyour TCP/IP software manual.

When you can log in successfully to the correct host through telnet, you have veri-fied that your local hosts file or name server has the correct IP address for thathost name, and that the user name and password you used are valid on that host.

Verifying Other Types of Network ConnectionThe procedure for verifying other types of communications link (including asyn-chronous communications) depends on the type of hardware and software youhave.

Page 89: UniVerse ODBC Guide

Troubleshooting 5-7

Connection ProblemsOn some server platforms, particularly HP-UX 10, failures can occur early in theconnection of the UniVerse ODBC server to the UCI server process. Theseproduce an error message containing a UniVerse error code of 930099.

If your client application does not show the detailed error message, you may needto create either a client or a server diagnostic log file to verify the error. To create aclient log, use Dr. DeeBee Spy on the ODBC data source. To create a server log file,use UniVerse ODBC Config to activate the Create Server Debug Log setting forthe appropriate configuration. For more information on UniVerse ODBC Configand Dr. DeeBee Spy, see “Testing UniVerse ODBC Configurations” on page 3-21.

If you experience error 930099, you may need to add a small delay in the UniVerseODBC connection sequence. To do this, increase the value of the UVFPDELAYenvironment variable. For more information about changing environment vari-able values, see Appendix C.

Windows NT Server-Related Problems❒ Are compatible versions of the UniVerse ODBC server and client products

installed (see “Universe ODBC Server and Client Compatibility” onpage 1-6)?

❒ Is the correct version of the Windows NT operating system installed?

❒ Is the UniVerse rexec service running?

❒ Is the UniRPC service running?

❒ Is there enough memory and paging space?

❒ Is there correct access to the UV account directory for all UniVerse ODBCuser IDs?

❒ Are the permissions set correctly on UniVerse accounts for intended users(this may require read/write access to the VOC file)?

❒ Is the UniVerse Resource service installed and started?

❒ Does other TCP-based software use too many TCP connections?

Page 90: UniVerse ODBC Guide

5-8 UniVerse ODBC Guide

UNIX Server-Related Problems❒ Are compatible versions of the UniVerse ODBC server and client products

installed (see “Universe ODBC Server and Client Compatibility” onpage 1-6)?

❒ Is the correct version of the UNIX operating system installed?

❒ Is the UNIX exec service running?

❒ Is the UniRPC daemon (unirpcd) running?

❒ Is the TMPDIR environment variable set (in the shell configuration script orthe hs_environ file), and does it point to a valid directory with enough diskspace for log files? Or if TMPDIR is not set, is /tmp a valid directory, or is it asymbolic link to one?

❒ Is there enough memory and paging space?

❒ Is there correct access to the UV account directory for all UniVerse ODBC userIDs?

❒ Are the correct permissions set on UniVerse accounts for intended users?(This can require write access to the VOC file.)

❒ Does other TCP-based software use too many TCP connections?

❒ Does the /etc/services file enable the exec service (usually on port 512)?

❒ Is the rexecd service available (/etc/inetd.conf lists the exec service as usingrexecd), and is a process using inetd running?

❒ Make sure that .cshrc does not change terminal parameters (.login and .profiledo not need to be run), and does not echo anything to standard output.

❒ Are there entries in /etc/hosts for all UniVerse ODBC client machines?

Windows NT and UNIX Server-RelatedProblems❒ Does the UniVerse ODBC System Administration menu option Activate

Access to Files in an Account run successfully on all UniVerse accounts to beaccessed (as evidenced by the HS.INSTALL.LOG file in the UniVerseaccount)?

❒ Are all functions used by virtual fields or fields with conversion or correlativecodes cataloged and listed in the account’s VOC?

Page 91: UniVerse ODBC Guide

Troubleshooting 5-9

❒ Are secondary indexes defined on likely query fields where possible?

❒ Are the file user permissions in the HS_FILE_ACCESS file in this account setcorrectly, as is the user-specific record based on the login used in the client’sconfiguration file?

❒ Does the record ID field appear in the dictionary of an updatable file?

Client-Related Problems❒ Are compatible versions of the UniVerse ODBC server and client products

installed (see “Universe ODBC Server and Client Compatibility” onpage 1-6)?

❒ Does the system have the required configuration of memory, processor type,and operating system?

❒ Is the supported Ethernet card installed correctly?

❒ Is the client TCP/IP software installed correctly, and is it verified to commu-nicate with this host?

❒ If your client TCP/IP software is configured to use a HOSTS file, is theHOSTS file accessible by the path (PATH environment variable on Windows)?

❒ Do the host names in the configuration file match those in the HOSTS file(case must match) or the name server? Make sure no IP addresses are used inthe configuration file (only host names).

❒ Do the HOSTS file entries for the host names used contain the correct IPaddresses?

❒ Does the HOSTS file specify the IP address of the first Ethernet controllerwhen multiple controllers are present?

❒ Does the rexec service port number in the UniVerse ODBC configurationmatch the host port setting in LINKPORT stored in the Windows NT Registryunder:

\HKEY_LOCAL_MACHINE\SOFTWARE\ArdentSoftware\UniVerse\CurrentVersion\UniVerse ODBC Server

❒ Was the UniVerse ODBC client installation completed successfully?

❒ Are UniVerse ODBC entries in UVODBC.INI (Windows) or environment vari-ables (UNIX) set up correctly?

Page 92: UniVerse ODBC Guide

5-10 UniVerse ODBC Guide

❒ Make sure that other Windows applications do not take up too muchmemory.

❒ Are the host names in the configuration file spelled and capitalized correctly?

❒ Are you using the correct user names and passwords?

❒ Are the database parameters in the configuration file absolute pathnames?

❒ Is the server parameter in the configuration file an absolute pathname, anddoes it correspond to the UV account directory?

Windows 3.1 Client-Related Problems❒ Is HIMEM.SYS loaded?

❒ Have changes to CONFIG.SYS, AUTOEXEC.BAT, and PATH affectedUniVerse ODBC?

❒ Does SMARTDRV take up too much memory? At least 1 MB, preferably2 MB, must be available after Windows is loaded.

❒ Is a large enough Windows swap file set up to accommodate all applicationsyou want to run concurrently?

Page 93: UniVerse ODBC Guide

ODBC Usage Notes A-1

AODBC Usage Notes

This appendix describes the UniVerse implementation of ODBC, including:

• SQL data types• Support for core and extended ODBC SQL grammar• UniVerse extensions to ODBC SQL grammar• Procedures• Executing UniVerse SQL• SQL-related connection options• Transaction support• ODBC table types

Data Types in SQLUniVerse ODBC supports the following SQL data types. Use the UniVerse SQLdata types in CREATE TABLE and ALTER TABLE statements, and the corre-sponding ODBC SQL data types in calls to the ODBC API.

UniVerse SQL Type ODBC SQL Type

CHARACTER [(n)] SQL_CHAR

DATE SQL_DATE

DECIMAL [(p[,s])] SQL_DECIMAL

DOUBLE PRECISION SQL_DOUBLE

FLOAT [(p)] SQL_FLOAT

INTEGER SQL_INTEGER

NUMERIC [(p[,s])] SQL_NUMERIC

REAL SQL_REAL

SMALLINT SQL_SMALLINT

Page 94: UniVerse ODBC Guide

A-2 UniVerse ODBC Guide

For information about specifying UniVerse SQL data types in UniVerse files, see“SQL Data Types” on page 4-16.

Support for Core ODBC SQL GrammarIn response to SQLGetInfo, UniVerse ODBC says that it supports the core ODBCSQL grammar. More accurately, it supports most of the core grammar. The parts itdoes not support are:

• Table name qualifiers in DDL. For example:

DROP TABLE MY_SCHEMA.MY_TABLE;

• The CASCADE and RESTRICT qualifiers of the REVOKE statement. Forexample:

REVOKE UPDATE, DELETE ON MY_TABLE FROM PUBLIC CASCADE;

• LIKE USER. For example:

SELECT * FROM MY_TABLE WHERE NAME LIKE USER;

• Qualified index names in CREATE INDEX, and unqualified names inDROP INDEX. For example:

CREATE INDEX MY_SCHEMA.MY_INDEX ON MY_TABLE (MY_COLUMN);

DROP INDEX MY_INDEX;

Support for Extended ODBC SQL GrammarUniVerse ODBC supports some of the extended ODBC SQL grammar.

TIME SQL_TIME

VARCHAR [(n)] SQL_VARCHAR1

1. The 254-character limit for strict VARCHAR definition isrelaxed to allow longer data values, although some ODBCapplication tools may assume this limit and truncate longervalues.

UniVerse SQL Type ODBC SQL Type

Page 95: UniVerse ODBC Guide

ODBC Usage Notes A-3

SELECT…FOR UPDATE StatementUniVerse ODBC supports the SELECT…FOR UPDATE version of the SELECTstatement. The syntax is as follows:

SELECT [ALL | DISTINCT] column_specificationsFROM table_specification[WHERE clause]FOR UPDATE [OF column[ ,column]…]

SELECT…FOR UPDATE locks selected rows with exclusive record or file locks,letting users update or delete the selected rows without having to wait for otherusers’ or process’s locks to be released. For example:

SELECT ORDERS.CUSTNAME, CUSTOMER.NAMEFROM ORDERS, CUSTOMERWHERE ORDERS.CUSTNO = CUSTOMER.CUSTNOFOR UPDATE OF CUSTOMER.NAME;

Outer JoinsUniVerse ODBC supports left outer joins in statements such as:

SELECT CODE AS STATE, COMPANYFROM OJ STATES

LEFT OUTER JOINCUSTOMERON STATES.CODE = CUSTOMER.STATE;

However, UniVerse ODBC does not support nested left outer joins, such as:

SELECT CODE AS STATE, COMPANY, PRODIDFROM OJ STATES

LEFT OUTER JOINCUSTOMER

LEFT OUTER JOINCUSTOMER_ORDERSON CUSTOMER.CUSTID = CUSTOMER_ORDERS.CUSTID

ON STATES.CODE = CUSTOMER.STATE;

In UniVerse SQL, the table expression on the left side of a left outer join can itselfbe a left outer join, but the table expression on the right side cannot. In ODBCSQL, the reverse is true: only the table expression on the right side can be a leftouter join. Therefore, in UniVerse ODBC SQL, neither the left nor the right tableexpression in a left outer join can be a left outer join.

Page 96: UniVerse ODBC Guide

A-4 UniVerse ODBC Guide

UNION ClauseUniVerse ODBC supports the UNION clause as given in the ODBC grammar. Forexample:

SELECT SCHEMA_NAME FROM CATALOG.UV_SCHEMAUNIONSELECT TABLE_NAME FROM CATALOG.UV_TABLES;

ESCAPE Clause in the LIKE PredicateUniVerse ODBC supports the ESCAPE clause in the LIKE predicate, which letsyou use % and _ as literal characters in a search pattern. For example:

SELECT * FROM PROJECTSWHERE STATUS LIKE '%80\% complete%' ESCAPE '\';

Date and Time TypesUniVerse ODBC supports DATE and TIME in CREATE TABLE and ALTERTABLE statements. It also supports date and time literals. For example:

CREATE TABLE HALS (BIRTHDAY DATE);

INSERT INTO HALS VALUES ({d '1997-01-12'});

Scalar FunctionsTable A-1 lists UniVerse ODBC support of scalar functions.

Table A-1. UniVerse ODBC Support of Scalar Functions

Function Supported

String ASCII NoCHAR NoCONCAT YesDIFFERENCE NoINSERT1 YesLCASE YesLEFT YesLENGTH YesLOCATE NoLTRIM YesREPEAT NoREPLACE No

Page 97: UniVerse ODBC Guide

ODBC Usage Notes A-5

RIGHT1 YesRTRIM YesSOUNDEX NoSPACE NoSUBSTRING YesUCASE Yes

Numeric ABS NoACOS NoASIN NoATAN NoATAN2 NoCEILING NoCOS NoCOT NoDEGREES YesEXP NoFLOOR NoLOG NoLOG10 NoMOD NoPI YesPOWER NoRADIANS YesRAND NoROUND NoSIGN NoSIN NoSQRT NoTAN NoTRUNCATE No

Time and Date CURDATE NoCURTIME NoDAYNAME NoDAYOFMONTH NoDAYOFWEEK NoDAYOFYEAR NoHOUR No

Table A-1. UniVerse ODBC Support of Scalar Functions (Continued)

Function Supported

Page 98: UniVerse ODBC Guide

A-6 UniVerse ODBC Guide

An example of a call to a scalar function is as follows:

SELECT * FROM UV_SCHEMAWHERE SCHEMA_NAME = {fn DATABASE()};

ODBC implies that no scalar functions can take an arithmetic expression or aparameter marker as an argument. UniVerse ODBC tolerates violations of thisrule, but in the future it may optionally catch them and give an error message.

UniVerse Extensions to ODBC SQL GrammarUniVerse ODBC supports the following driver-specific extensions to the SQLgrammar.

The following extensions are always available:

• Mixed-case keywords• Multiline statements

MINUTE NoMONTH NoMONTHNAME NoNOW NoQUARTER NoSECOND NoTIMESTAMPADD NoTIMESTAMPDIFF NoWEEK NoYEAR No

System DATABASE YesIFNULL NoUSER Yes

Conversion CONVERT2 Yes

1. INSERT and RIGHT may evaluate their arguments more than once, conse-quently you cannot use a parameter marker as an argument to these functions,and you must watch out for side effects if you use an I-descriptor.

2. UniVerse ODBC supports the same conversions that UniVerse SQL CASTsupports.

Table A-1. UniVerse ODBC Support of Scalar Functions (Continued)

Function Supported

Page 99: UniVerse ODBC Guide

ODBC Usage Notes A-7

• End-of-line comments beginning with two hyphens (--)• The {NATIVE} statement

The following extensions are available only when the Reject non-ODBC SQLSyntax option is off (the default setting):

• The ORDER BY clause in SELECT…FOR UPDATE statements

• The COUNT (expression) clause

• The EXPLAIN and NOWAIT keywords

• The concatenation operator ( || )

• The following scalar functions:

– CHAR[ACTER]_LENGTH– CONCAT– LOWER– UPPER

• The following values in the VALUES clause of an INSERT statement:

– Literals

– The null value

– USER

– ODBC scalar functions

– The UniVerse scalar functions CHAR_LENGTH, CONCAT, LOWER,and UPPER

– Combinations of the above with arithmetic operators, the concatenationoperator, or ODBC scalar functions

• SOME instead of ANY or ALL before a subquery

NOWAIT KeywordUniVerse ODBC supports the NOWAIT keyword at the end of the followingstatements:

• SELECT (including SELECT…FOR UPDATE)• INSERT• UPDATE• DELETE

Page 100: UniVerse ODBC Guide

A-8 UniVerse ODBC Guide

NOWAIT prevents users from having to wait if another user or process has a fileor record lock that prevents the database operation from proceeding. Forexample:

INSERT INTO SALESMENSELECT * FROM EMPSWHERE DEPTCODE = 'SALES'NOWAIT;

EXPLAIN KeywordUniVerse ODBC supports the EXPLAIN keyword for use in SELECT statements.EXPLAIN returns information about how the statement will be processed, lettingusers decide if they want to rewrite the query more efficiently. The SELECT state-ment is not executed.

SQL Usage Notes and RestrictionsThe following issues also affect SQL usage in UniVerse ODBC:

• INSERT statements• Parameter markers• DDL• ODBC-compliant names• Column aliases

INSERT StatementsUniVerse handles SQL INSERT statements that do not include an explicit columnlist as documented in UniVerse SQL Reference. For files, the values listed in theVALUES clause should match the fields defined in the @INSERT phrase. Fortables, the values should match the columns defined in the SICA.

Parameter MarkersODBC SQL has certain restrictions on the use of parameter markers. UniVerseODBC tolerates some violations of these restrictions, but in the future it mayoptionally catch them and give an error message.

No DDL on FilesSQL DDL statements that create, drop, alter, grant, or revoke privileges on tablesare permitted on tables and views only. To use DDL statements on a file, the filemust be converted to a table.

Page 101: UniVerse ODBC Guide

ODBC Usage Notes A-9

Tolerance of ODBC-Compliant NamesWhen name mapping is on (the default), and the Retry as UniVerse SQL option isoff, UniVerse ODBC returns an error if an SQL statement includes an ODBC qual-ifier name, table name, or column name that is not ODBC-compliant. However,UniVerse ODBC does not check the ODBC compliance of index names, correlationnames, or column aliases.

Column AliasesThe UniVerse ODBC interpretation of column aliases is closer to that of SQL-92than to that of UniVerse. This interpretation is better suited for the defaultbehavior of ODBC. UniVerse ODBC permits references to column aliases only inORDER BY clauses. As of Release 9, UniVerse permits references to columnaliases in other places.

ProceduresAll UniVerse procedures are available through UniVerse ODBC as ODBCprocedures. These include, but are not limited to, BASIC programs and para-graphs. For details about UniVerse procedures, see UCI Developer’s Guide orUniVerse BASIC SQL Client Interface Guide. For details about ODBC procedures,see Microsoft ODBC 2.0 Programmer's Reference and SDK Guide.

To invoke procedures using UniVerse ODBC, you need to write custom SQL state-ments, and, depending on your ODBC application, you may need to write customODBC calls.

SyntaxUniVerse ODBC supports the following ODBC syntax for procedure calls:

{CALL procedure [(parameter1, … parametern)]}The braces are part of the syntax and must be specified. You can specify parame-ters as bound parameters (?) or as literals.

You can specify parameters only when calling a BASIC subroutine. When callingother UniVerse procedures, enclose the entire command in double quotationmarks. For example:

{CALL "LIST CUSTOMER WITH CUSTID = 2"}

Page 102: UniVerse ODBC Guide

A-10 UniVerse ODBC Guide

If procedure contains periods or is otherwise not ODBC-compliant, you mustenclose it in double quotation marks. For example:

{CALL "MY.BASIC.SUBROUTINE" (?, ?, ?)}

You might think to call MY.BASIC.PROGRAM as MY_BASIC_PROGRAM, butyou can’t, because UniVerse ODBC does not apply its name-mapping feature toprocedure names.

ParametersYou can bind a procedure parameter using any SQL type that UniVerse ODBCsupports (see “Data Types in SQL” on page A-1). However, the UniVerse engineitself treats all procedure parameters as character strings. Therefore, binding sucha parameter using an SQL type other than SQL_CHAR or SQL_VARCHAR makesUniVerse ODBC check that the value of the parameter is compatible with the SQLtype, and generate an error or warning if it is not.

You can bind any procedure parameter as input, input/output, or output. If youbind a procedure parameter as input/output or output and successfully executethe procedure, UniVerse ODBC always returns some value for the parameter.

In UniVerse ODBC, the values of output parameters are available immediatelyafter the return of SQLExecute or SQLExecDirect. But this is not true of all ODBCdrivers; according to Microsoft ODBC 2.0 Programmer's Reference and SDK Guide, adriver is not guaranteed to return the output parameters of a procedure until afterall of the procedure’s results have been fetched. For maximum interoperability,you should not attempt to read output parameter values until then.

If an error occurs during the process of returning a value for an output parameter,UniVerse ODBC may return a null value for the parameter.

Result SetsA procedure may or may not return a result set.

The number and types of columns in the result set of a procedure are not availableuntil the procedure is executed. SQLPrepare immediately followed by SQLNum-ResultCols, SQLDescribeCol, or SQLColAttributes gives an error.

The number and types of columns in the result set of a procedure may changefrom execution to execution.

Behavior of SQLRowCountSQLRowCount returns a value of –1 after a procedure that returns a result set.

Page 103: UniVerse ODBC Guide

ODBC Usage Notes A-11

After a procedure which does not return a result set, SQLRowCount returns whatthe UCI SQLRowCount function returns. This might not be what you expect; seeUCI Developer’s Guide for more information.

LimitationsUniVerse ODBC does not support the following ODBC procedure functionality:

• Return values from procedures. For example, the following statementgenerates an error:

{? = CALL MYPROC(?, ?)}

The ? = is used for procedures with return values. UniVerse procedures canreturn data through any parameter, but they don’t have return values assuch, so UniVerse ODBC does not support this feature.

• Procedure names qualified with a qualifier or an owner. For example, thefollowing statement generates an error:

{CALL MYSCHEMA.MYPROC(?, ?)}

This syntax is legal in ODBC data sources in which procedures can be qual-ified with a qualifier or owner name, or both. It is illegal in UniVerse ODBCbecause UniVerse does not support qualified procedure names. See UCIDeveloper’s Guide or UniVerse BASIC SQL Client Interface Guide for moreinformation.

If your procedure name contains periods, it must be quoted, as notedearlier.

• Catalog information.

ODBC defines two functions that return catalog information aboutprocedures. SQLProcedures returns a list of procedures. SQLProce-dureColumns returns a list of parameters and of columns in the result setsof procedures. In UniVerse ODBC these functions always return emptyresult sets.

Consequently, to call a procedure, you must already know its name and thenumber and types of its parameters. Each time you execute a procedure, ifthe execution produces a result set, you can find out about the number andtypes of columns in the result set.

• Default values of procedure parameters.

Page 104: UniVerse ODBC Guide

A-12 UniVerse ODBC Guide

Interoperability with Generic ODBC ApplicationsThe UniVerse ODBC implementation of procedures differs from that of otherODBC drivers in these respects:

• SQLProcedures and SQLProcedureColumns always return empty resultsets.

• You can’t call SQLPrepare, and then call SQLNumResultCols, SQLDe-scribeCol, or SQLColAttributes without first calling SQLExecute.

• You can’t prepare a procedure, then execute it multiple times, with theguarantee that the number and types of columns in its result set will be thesame after each execution.

A generic ODBC application may not expect this behavior. Therefore, to useUniVerse ODBC procedures, you probably need to write custom SQL calls, anddepending on your ODBC application, you may need to write custom ODBCcalls.

See the UniVerse release notes for information on interoperability with specificODBC applications.

Executing UniVerse SQLYou can pass an ODBC application’s SQL syntax directly to UniVerse. Thisbypasses UniVerse ODBC’s SQL processor, which performs operations such asparsing, name mapping, and validating SQL syntax, and directly accessesUniVerse’s SQL interpreter. You can do this using one of the following methods:

• Using the UniVerse ODBC-specific {NATIVE} syntax extension• Configuring the ODBC data source to retry statements as UniVerse SQL• Configuring the ODBC data source not to require strict ODBC syntax

The {NATIVE} Syntax ExtensionTo let you use native SQL syntax that conflicts with ODBC-standard SQL,UniVerse ODBC supports an SQL extension that allows the direct pass-through ofnative statements (SQL or other database-specific commands) to the databasewithout interpretation. The syntax for this extension is:

{NATIVE statement}The braces are part of the syntax and must be specified. statement is the single- ordouble-quoted string to pass to the underlying database without translation. If

Page 105: UniVerse ODBC Guide

ODBC Usage Notes A-13

you use single quotation marks to delimit statement and want to include a literalsingle quotation mark in statement, double the single quotation mark. Similarly, ifyou use double quotation marks to delimit statement and you want to include aliteral double quotation mark in statement, double the double quotation mark.

UniVerse ODBC does not support name mapping or file access control in thisextension.

Retrying Statements as UniVerse SQLIn an ODBC connection, retrying statements as UniVerse SQL can be on or off. It isoff by default.

When retrying statements as UniVerse SQL is on, if UniVerse ODBC fails to inter-pret an SQL statement as a valid ODBC SQL statement, it retries the statement;that is, it tries to interpret the statement as though it were written in UniVerseSQL. If your ODBC application was developed to use the special features ofUniVerse SQL, you may want to turn this option on by setting theHS_RETRY_AS_UV_SQL environment variable to YES or ON, or by clicking Yesat the Retry as UniVerse SQL in the UniVerse ODBC Data Source Setup dialogbox.

When this option is off, UniVerse ODBC always tries to interpret SQL as ODBCSQL (unless a statement conforms to UniVerse ODBC’s native SQL extension, inwhich case, UniVerse ODBC always passes the statement through). If you wantyour ODBC application to be portable across multiple databases, do not activatethis option. In addition, you can set one or more of the options that enforce ODBCsyntax. By doing so you ensure that the application’s SQL statements are portableacross databases and provide uniform error messages when SQL does not meetportability standards.

Retrying statements as UniVerse SQL takes effect only when name mapping is off.This option bypasses the translation of the client’s SQL statement from ODBCSQL to UniVerse SQL, in which ODBC names are converted to UniVerse equiva-lents. If you want to use UniVerse extensions directly through this option, youalso must use UniVerse native file, table, and column names in your SQLstatements.

UniVerse ODBC does not support file access control in retried statements.

Retrying statements as UniVerse SQL is useful mainly to support custom ODBCapplications that “know” they are accessing UniVerse databases. You should turnthis option off when you use it with commercial ODBC-aware applications.

Page 106: UniVerse ODBC Guide

A-14 UniVerse ODBC Guide

SQL-Related Connection OptionsThe client can use the UniVerse ODBC Data Source Setup dialog box to set manySQL-related UniVerse ODBC connection options. For more information, see“Other Data Source Setup Options” on page 3-8.

Transaction SupportThe UniVerse ODBC server supports two modes of transaction behavior:

• Autocommit mode (the default when the server starts)• Manual mode

Autocommit ModeIn autocommit mode the UniVerse ODBC server treats every SQL statementreceived from a client as a separate transaction within the data session. It commitsevery statement that could have modified the database.

DDL statements such as CREATE TABLE are allowed only when the driver is inautocommit mode.

Multiple Statement HandlesWhenever a transaction is committed or rolled back, all open statement handleson that connection are closed. If your application is using autocommit mode andit executes an INSERT, UPDATE, or DELETE SQL statement on one ODBC state-ment handle, all other statement handles (such as for SELECT statements) areclosed and cannot be used for additional SQLFetch operations. If you want to useSQLFetch to fetch rows one at a time from one SELECT statement, and you wantto execute INSERT, UPDATE, or DELETE statements on another ODBC statementhandle (this might be typical for a records-maintenance application), use manualmode.

For more information on cursor commit behavior and transaction modes inODBC, see Microsoft ODBC 2.0 Programmer’s Reference and SDK Guide.

Manual ModeIn manual mode the server runs the SQL statements as they come in from theclient, but it defers committing changes to the database until it receives an explicitcommit or rollback command from the client.

Page 107: UniVerse ODBC Guide

ODBC Usage Notes A-15

ODBC client applications request transaction commits or rollbacks internally bycalling the ODBC SQLTransact function on the UniVerse ODBC driver. EachODBC client application has its own user interface to control transactions.

ODBC Table TypesAn ODBC table’s type is presented in the TABLE_TYPE column of the SQLTablesresult set. UniVerse ODBC maps UniVerse file structures to ODBC table types asfollows:

UniVerse File Type ODBC Table Type

Table TABLE

View VIEW

File TABLE

Page 108: UniVerse ODBC Guide

A-16 UniVerse ODBC Guide

Page 109: UniVerse ODBC Guide

Error Messages B-1

BError Messages

This appendix describes the UniVerse ODBC server error reporting system. It alsoexplains how to obtain information about an error.

Message DescriptionsEach message description includes the Error ID, Severity, and Facilities codes.Because some errors originate in other products such as your database or TCP/IPproduct, it is not possible to list every error message. Instead, the word STRINGrefers to a portion of the message that varies depending on the server platform ordatabase. In these cases, you may need to refer to your product’s documentationfor details.

Errors are returned as a set of codes to an application program or as text to a user.In either case, an error consists of four components:

Component Description

Message A brief description of the error, displayed on the screen.

Error ID The numeric code that identifies the specific error orwarning.

Severity The error’s level of severity. Informational or warningmessages do not prevent further processing. Errors, severeerrors, or fatal errors usually do. The severity levels are asfollows:

SUCCESS – Successful completion.

INFO – Successful completion with extra information.

WARNING – Completion with information such as trunca-tion or roundoff errors.

Page 110: UniVerse ODBC Guide

B-2 UniVerse ODBC Guide

Messages

A CREATE VIEW statement’s name list did not correspond to the querydefining the view.Error ID: 10, Severity: ERROR, Facility: DBCAPERR

ADDing a column to a table failed because there is already a column with thespecified name.Error ID: 30, Severity: ERROR, Facility: DBCAPERR

An INSERT statement contained the wrong number of values for the targettable.An INSERT statement contained the wrong number of values for the target table.Verify that the number of parameter markers and values supplied are consistentwith the table’s definition.

Error ID: 9, Severity: ERROR, Facility: DBCAPERR

An invalid HSTMT was encountered.The HSTMT associated with this SQL statement was either invalid or equal toSQL_NULL_HSTMT when it should have been valid.

Error ID: 61, Severity: ERROR, Facility: DBCAPERR

An invalid parameter type has been specified.Error ID: 38, Severity: ERROR, Facility: DBCAPERR

ERROR – Failure to complete operation. UniVerse ODBC isstill functioning, but an exceptional situation is reported(such as a locked record or invalid parameters).

SEVERE – Failure to complete operation and UniVerse ODBCsystem failure. Try to save what you can and discontinue.

FATAL – Failure of the UniVerse ODBC system. This is mostcommonly caused by the lack of virtual memory and bycommunications failures. Continued use of the UniVerseODBC connection is likely to fail.

Facility The source of the error, usually the software module fromwhich the error originated. This information is useful whencalling technical support.

Component Description

Page 111: UniVerse ODBC Guide

Error Messages B-3

An operation in progress could not be canceled.Error ID: 24, Severity: ERROR, Facility: DBCAPERR

A positioned UPDATE or DELETE failed to modify any rows.An UPDATE or DELETE WHERE CURRENT OF cursorname did not modify anyrows in the SELECT FOR UPDATE statement on cursorname.

Error ID: 7, Severity: ERROR, Facility: DBCAPERR

A positioned UPDATE or DELETE modified more than 1 row.An UPDATE or DELETE WHERE CURRENT OF cursorname affected more rowsthan the last row fetched by cursorname.

Error ID: 8, Severity: ERROR, Facility: DBCAPERR

Argument to Scalar Function not compatible with parameter type.A literal value supplied to a scalar function is not compatible with the requiredparameter type.

Error ID: 42, Severity: ERROR, Facility: FPSRVERR

Argument value out of range.An argument value was outside the allowable range for this request.

Error ID: 45, Severity: ERROR, Facility: FPSRVERR

Attempt to connect to a database which uses string and/or identifier delim-iters which UV/ODBC does not support.UniVerse ODBC supports only those databases in which the delimiter characterfor SQL string literals is single quotation marks, and the delimiter character forSQL identifiers is double quotation marks. The user attempted to connect to a data-base that did not have this property.

Error ID: 66, Severity: ERROR, Facility: DBCAPERR

Attempt to stream a non-streamable attribute.Attempt to read a file or connect to a server failed. This most likely happenedbecause of incompatible software versions, communications errors, or data filecorruption.

Error ID: 9, Severity: FATAL, Facility: XIOERR

Page 112: UniVerse ODBC Guide

B-4 UniVerse ODBC Guide

Attempt to stream a non-streamable object.Attempt to read a file or connect to a server failed. This most likely happenedbecause of incompatible software versions, communications errors, or data filecorruption.

Error ID: 8, Severity: FATAL, Facility: XIOERR

Bad socket number.This error is an internal communications error. Disconnect and reconnect. If thatfails, reboot the PC.

Error ID: 101, Severity: SEVERE, Facility: LINKERR

CREATE INDEX failed because the specified index already exists.CREATE INDEX failed because the specified index already exists.

Error ID: 28, Severity: ERROR, Facility: DBCAPERR

CREATE TABLE/VIEW failed because a table or view with that name alreadyexists.CREATE TABLE or CREATE VIEW failed because a table or view with that namealready exists.

Error ID: 26, Severity: ERROR, Facility: DBCAPERR

Cannot interpret input data. Versions incompatible.Attempt to read a file or connect to a server failed because of incompatible soft-ware versions.

Error ID: 15, Severity: FATAL, Facility: OIOERR

Cannot read a directory as a file.Attempt to read data from a directory failed. Check your file pathname.

Error ID: 11, Severity: ERROR, Facility: OIOERR

Character mapping file STRING not found or not accessible.The indicated character mapping file was not found or is not accessible. No char-acter mapping is being performed.

Error ID: 13, Severity: INFORMATION, Facility: XIOERR

Page 113: UniVerse ODBC Guide

Error Messages B-5

Character mapping file STRING is invalid: STRING.The indicated character mapping file contains a syntax error that prevents it frombeing interpreted. No character mapping is being performed. The last part of themessage indicates where the error was detected.

Error ID: 12, Severity: INFORMATION, Facility: XIOERR

Client timed out waiting for initial server response.The UniVerse ODBC driver timed out waiting for the initial response from theUniVerse ODBC server. If the client’s login timeout interval is too short, you canincrease it by setting the SQL_LOGIN_TIMEOUT connection option to a highervalue.

Error ID: 5, Severity: ERROR, Facility: OCLIERR

Column number out of bounds.A numeric reference to a column failed because the column number was out ofbounds.

Error ID: 32, Severity: ERROR, Facility: DBCAPERR

Communications connection closed remotely.The TCP connection was closed by the remote data source host system. This can becaused by a failure of the host or of the host server program. Contact your systemadministrator.

Error ID: 4, Severity: FATAL, Facility: XIOERR

Communications connection failed locally.Some client local problem occurred while reading or writing streamed data to orfrom the network. Reconcile the external error number against your operatingsystem’s socket I/O error number list for more details.

Error ID: 3, Severity: FATAL, Facility: XIOERR

Communications driver not loaded.TCP/IP network driver software has not been loaded or is not running. Check tosee that it has been installed correctly.

Error ID: 3, Severity: FATAL, Facility: OIOERR

Communications error. STRING.A communications error has occurred. The connection has been closed. Retry theconnection. If this message persists, contact Ardent Customer Support.

Error ID: 123, Severity: SEVERE, Facility: LINKERR

Page 114: UniVerse ODBC Guide

B-6 UniVerse ODBC Guide

Connection closed from server.The UniVerse ODBC server process has terminated abnormally. This could becaused by the host computer being rebooted, or it could indicate a problem in theserver. Check that the server is running. Disconnect and reconnect. If that fails,reboot the PC.

Error ID: 109, Severity: SEVERE, Facility: LINKERR

Connection failure; the link reports: STRING.The server process for this connection could not be logged in. The message reportsthe reason, as reported by the host rexec or autostart daemon.

Error ID: 6, Severity: SEVERE, Facility: LINKERR

Connection has been aborted.This error can result from a variety of situations, such as the host is shut down, thehost operator force logged out the server process, the host inactivity time-outexpired and logged out the server process, TCP/IP has failed, or a fatal erroroccurred to the server process. Retry the connection. If this fails, reboot your PCand try again. If this fails, check to see if the host and TCP/IP are running.

Error ID: 102, Severity: SEVERE, Facility: LINKERR

Connection has closed.The UniVerse ODBC client is having trouble initiating communication to theserver. This is often caused by invalid link parameters in the configuration file. UseUniVerse ODBC Config to check the port number of the host rexec or autostartdaemon (typically 512 for UNIX).

This error can also result from a variety of situations, such as the host is shut down,the host operator force logged out the server process, the host inactivity time-outexpired and logged out the server process, TCP/IP has failed, or a fatal erroroccurred to the server process. Retry the connection. If this fails, reboot your PCand try again. If this fails, check to see if the host and TCP/IP are running.

Error ID: 103, Severity: SEVERE, Facility: LINKERR

Connection is not open.The UniVerse ODBC client is having trouble initiating communication to theserver. This is often caused by a host being down or by invalid link parameters inthe configuration file.

Use UniVerse ODBC Config to check the spelling of the System Name. Also checkthe port number of the host rexec or autostart daemon (typically 512 for UNIX).

Page 115: UniVerse ODBC Guide

Error Messages B-7

Retry the connection. If this fails, reboot your PC and try again. If this fails, checkto see if the host and TCP/IP are running.

Error ID: 104, Severity: SEVERE, Facility: LINKERR

Connection or statement option was set to a value other than that specified.Driver or server does not support the requested value of the specified option andsubstituted a similar value.

Error ID: 6, Severity: WARNING, Facility: DBCAPERR

Connection refused.The server rexec daemon is not running on the host system, or the port number inthe configuration file is incorrectly specified. Use UniVerse ODBC Config to checkthe port number of the host rexec or autostart daemon (typically 512 for UNIX).

Retry the connection. If this fails, reboot your PC and try again. If this fails, checkto see if the host and its TCP/IP inetd, rexec, or autostart daemon are running.

Error ID: 108, Severity: SEVERE, Facility: LINKERR

Connection timed out.This reports an attempt to connect to a host that did not accept the connectionwithin the time limit set in the local PC TCP software (usually several minutes).This can happen if the host is not running TCP/IP, or is not running at all. It canalso occur if the system is very heavily loaded and other UniVerse ODBC users arealso trying to connect at the same time. Check the host system and try again.

This error can also occur during the course of normal communications if the hostor client system becomes very heavily loaded or hangs. In this case, check both thehost and the client. If the problem persists, reboot both systems and try again.

Error ID: 107, Severity: SEVERE, Facility: LINKERR

Conversion method unknown.The type of an argument supplied to a conversion function is not compatible withthe type expected by that function. If the ODBC data source is configured withEnforce ODBC Function Argument Types set, arguments to conversion functionsmust be compatible with expected data types.

Error ID: 44, Severity: ERROR, Facility: FPSRVERR

Conversion of a value to a numeric type caused an underflow.A text- or number-to-number conversion failed because the number was too smallor too far negative to be represented in the specified format.

Error ID: 26, Severity: ERROR, Facility: DATUMERR

Page 116: UniVerse ODBC Guide

B-8 UniVerse ODBC Guide

Could not login to database STRING as user STRING.A database session could not be established because the database name, username, or password was invalid.

Error ID: 3, Severity: FATAL, Facility: DBCAPERR

Could not open COM port.The serial communications port could not be opened. This can be caused by spec-ifying a serial port that does not exist, or that is already in use by another applica-tion or a serial mouse, or by invalid link parameters. Close other applications thatmight be using the serial port (such as terminal emulators) and try again. UseSTAR/Config to verify the link parameters.

Error ID: 115, Severity: SEVERE, Facility: LINKERR

Could not start server. STRING.The server process could not be started for the indicated reason. Correct theproblem and try again.

Error ID: 124, Severity: SEVERE, Facility: LINKERR

Could not make name unique: more than 10 million names with the samestem.Could not find a _nnnnnnn suffix for a name, which would make it unique withina space of names because 9,999,999 suffixes have already been given out for thatname. This is an extremely rare error. Contact Ardent Customer Support.

Error ID: 45, Severity: ERROR, Facility: DATUMERR

Cursor could not honor a FETCH_SAME_AS_LAST request.The database interface could not fetch the same number of rows as the last requestbecause there was no last request.

Error ID: 11, Severity: ERROR, Facility: FPSRVERR

Cursor not found with given name.The indicated cursor name does not correspond to any allocated cursor.

Error ID: 5, Severity: ERROR, Facility: FPSRVERR

Cursor number not currently allocated.The indicated cursor number is not allocated.

Error ID: 6, Severity: ERROR, Facility: FPSRVERR

Page 117: UniVerse ODBC Guide

Error Messages B-9

DDL statements are illegal within a Transaction.DDL statements are illegal within a transaction.

Error ID: 62, Severity: ERROR, Facility: DBCAPERR

Database capsule creation failed.Error ID: 9, Severity: FATAL, Facility: FPSRVERR

Database error.The database encountered an error while performing the operation. See your data-base manual for an explanation of the message and external error code.

Error ID: 1, Severity: ERROR, Facility: DBCAPERR

Database name/uid/password parameters must be textual.User name and password strings must be alphanumeric. If your user name or pass-word could be interpreted as a number, currency, date, or time, enclose it in doublequotation marks.

Error ID: 13, Severity: SEVERE, Facility: LINKERR

Database reported a miscellaneous warning.The database reported a warning to UniVerse ODBC but did not specify the natureof the problem.

Error ID: 37, Severity: WARNING, Facility: DBCAPERR

Database table integrity constraint violation.An operation was attempted that would have violated integrity constraints on adatabase table.

Error ID: 17, Severity: ERROR, Facility: DBCAPERR

Database warning.The database generated warnings while performing the operation. See your data-base manual for an explanation of the message and external error code.

Error ID: 2, Severity: WARNING, Facility: DBCAPERR

Data conversion error: STRING.The data in this column is invalid for the defined SQL data type. The most commonreason is nonnumeric data in numeric or date/time columns.

Error ID: 67, Severity: WARNING, Facility: DBCAPERR

Page 118: UniVerse ODBC Guide

B-10 UniVerse ODBC Guide

Data source does not support default values of parameters of procedures.Error ID: 62, Severity: ERROR, Facility: FPSRVERR

Data source does not support table name qualifiers.Error ID: 37, Severity: ERROR, Facility: FPSRVERR

Data source not capable.A construct was passed to the data source for which no support is provided.

Error ID: 36, Severity: ERROR, Facility: FPSRVERR

Data source not capable due to Dynamic Parameter.This data source does not support a dynamic parameter value in this position.

Error ID: 43, Severity: ERROR, Facility: FPSRVERR

Data truncated.All of the data for the specified column, icol, could not be retrieved in a single callto the function.

Error ID: 28, Severity: WARNING, Facility: OIOERR

Data truncated entering or leaving the database.Either more data was provided than the defined column width, or the columncontained more data than the output buffer could hold.

Error ID: 4, Severity: WARNING, Facility: DBCAPERR

Data type conflict.The data type of a bound statement parameter or literal conflicted with the corre-sponding table column.

Error ID: 13, Severity: ERROR, Facility: DBCAPERR

Date/Time/Timestamp literal too long.Error ID: 22, Severity: ERROR, Facility: FPSRVERR

Date/Time overflow.A date/time parameter or literal in an SQL statement overflowed its allowedrange.

Error ID: 14, Severity: ERROR, Facility: DBCAPERR

Page 119: UniVerse ODBC Guide

Error Messages B-11

Date/Time overflow.A date/time parameter or literal in an SQL statement overflowed its allowedrange.

Error ID: 70, Severity: WARNING, Facility: DBCAPERR

Date or Time data truncated entering or leaving the database.Error ID: 51, Severity: WARNING, Facility: DBCAPERR

Datetime field overflow.The data for the column was not a valid date, time, or timestamp value.

Error ID: 30, Severity: ERROR, Facility: OIOERR

Disconnection failed because a COMMIT or ROLLBACK was in progress.The disconnection failed because a COMMIT or ROLLBACK was in progress.

Error ID: 19, Severity: ERROR, Facility: DBCAPERR

Divide by zero error.A divide-by-zero exception occurred during the execution of an SQL statement.

Error ID: 15, Severity: ERROR, Facility: DBCAPERR

Duplicate cursor name.A cursor name assignment failed because the name already refers to anothercursor.

Error ID: 22, Severity: ERROR, Facility: DBCAPERR

Empty string found in date/time column.An empty string was found in a column defined by UniVerse SQL as SQL_DATEor SQL_TIME.

Error ID: 68, Severity: WARNING, Facility: DBCAPERR

End of data encountered.The database indicated that the end of the data associated with this request hasbeen reached.

Error ID: 10, Severity: INFORMATION, Facility: FPSRVERR

Page 120: UniVerse ODBC Guide

B-12 UniVerse ODBC Guide

Error checking " STRING": STRING.Some problem occurred when UniVerse ODBC tried to check the status of a file.Check the external error number against your operating system’s documentationto determine the cause.

Error ID: 6, Severity: ERROR, Facility: OCLIERR

Error fetching BASIC result set: [ STRING] STRING.UniVerse ODBC encountered an error fetching results from one of the catalogedBASIC helper programs it uses to obtain UniVerse data dictionary information.

Error ID: 57, Severity: ERROR, Facility: FPSRVERR

Error from Load Library.An error occurred while an application was trying to load the .DLL file for the linktype of the specified logical database. Check your PATH for invalid directories.Verify that there are no invalid or out-of-datDLL files in your path. UseSTAR/Config to verify that the Link Type for this database is spelled correctly. Ifthis message persists, report the external error code from the error detail messagebox to your Ardent Customer Support contact.

Error ID: 16, Severity: SEVERE, Facility: LINKERR

Error opening " STRING": STRING.Some problem occurred when UniVerse ODBC tried to open a file, as reported bythe stream. Check the external error number against your operating system’sdocumentation to determine the cause.

Error ID: 2, Severity: ERROR, Facility: OCLIERR

Error writing " STRING": STRING.Some problem occurred when UniVerse ODBC tried writing to a file, as reportedby the stream. This error usually occurs when the system is running out of diskspace. Check the external error number against your operating system documen-tation to determine the cause.

Error ID: 3, Severity: ERROR, Facility: OCLIERR

Escape character not length 1.The LIKE operator escape character must be a single character.

Error ID: 38, Severity: ERROR, Facility: FPSRVERR

Page 121: UniVerse ODBC Guide

Error Messages B-13

Failure reading data from file.A premature end-of-file or some other problem occurred while an application wasreading streamed data from a file. Your file may have been truncated because ofthe lack of disk space, or somehow corrupted. Reconcile the external error numberagainst your operating system’s error number list for more details.

Error ID: 1, Severity: FATAL, Facility: XIOERR

Failure writing data to file.Some problem occurred while an application was writing streamed data to a file.Your file may have been truncated because of the lack of disk space, or your diskmay be corrupted. Reconcile the external error number against your operatingsystem’s error number list for more details.

Error ID: 2, Severity: FATAL, Facility: XIOERR

File write error, disk probably full.A client was unable to write data to a disk file. Check free space on your disk.

Error ID: 19, Severity: ERROR, Facility: OIOERR

Floating-point value was truncated to integer.A floating-point value was truncated during conversion to integer.

Error ID: 43, Severity: WARNING, Facility: DATUMERR

Host STRING not found.The name of the host machine could not be translated into a network address.There is an error in the configuration file’s Host Node Name entry or a HOSTS fileproblem with the TCP/IP software. Use UniVerse ODBC Config to check theSystem Name, then check to see that there is an entry in the HOSTS file corre-sponding to it and that the HOSTS file is in the DOS path.

Error ID: 121, Severity: SEVERE, Facility: LINKERR

Identifier too big.An identifier component (qualifier, owner name, table name, or column name) islonger than 128 characters.

Error ID: 27, Severity: ERROR, Facility: FPSRVERR

Incorrectly formatted date/time.You typed a date/time value that could not be interpreted. Use the ANSI-standardYYYY-MM-DD HH:MM:SS HH:MM format. Note, however, that you cannotinclude any elements that are outside the precision of the date/time column (that

Page 122: UniVerse ODBC Guide

B-14 UniVerse ODBC Guide

is, you cannot include the time if the column is defined as date-only). Also notethat the time zone is optional.

Error ID: 13, Severity: ERROR, Facility: DATUMERR

Incorrectly formatted integer.You typed a value that could not be interpreted as an integer. Integers consist onlyof digits, with an optional + or – sign.

Error ID: 22, Severity: ERROR, Facility: DATUMERR

Incorrectly formatted interval.You typed an interval value that could not be interpreted. Use the ANSI-standardYYYY-MM or DD HH:MM:SS format. Note, however, that you cannot include anyelements that are outside the precision of the interval column.

Error ID: 20, Severity: ERROR, Facility: DATUMERR

Incorrectly formatted number.You typed a value that could not be interpreted as a number. Numbers consist ofan optional plus (+) or minus (–) sign, integer part, decimal point, fractional part,and exponent (including “e” for exponent, optional sign, and integer exponentvalue). For example, 1.2 and –3.4e56

Error ID: 23, Severity: ERROR, Facility: DATUMERR

Index names must be unqualified in CREATE INDEX and qualified in DROPINDEX.In UniVerse SQL and UniVerse ODBC SQL, index names must be unqualified inCREATE INDEX statements and qualified in DROP INDEX statements.

Error ID: 61, Severity: ERROR, Facility: FPSRVERR

Input/output parameter bound to non-procedure statement.Input/output parameters provide only output values when used with procedurecalls. Other statements treat I/O parameters as input-only.

Error ID: 45, Severity: WARNING, Facility: DBCAPERR

Internal error. Please report details to your UV/ODBC Support contact:Assorted Internal Errors.You have encountered an unexpected internal error. Record what you were doingand the complete error information (such as the Error ID, Extern ID, Severity, andFacility). Then report this information to Ardent Customer Support.

Page 123: UniVerse ODBC Guide

Error Messages B-15

Invalid Cursor State.A cursor unprepared by an autocommit caused by a previously executed state-ment.

Error ID: 8, Severity: ERROR, Facility: OCLIERR

Invalid Date literal.A date literal is in an invalid format. If the ODBC data source is configured withEnforce ODBC Dates/Times checked, all four digits of year and two digits ofmonth and day must be specified.

Error ID: 23, Severity: ERROR, Facility: FPSRVERR

Invalid Link Parameter.The link parameters field for this logical database contains an invalid value. Forserial connections, this field must have the same format as the DOS MODEcommand line parameter. Use STAR/Config to verify the Link Parameter settingand use the Ping function to test it.

Error ID: 114, Severity: SEVERE, Facility: LINKERR

Invalid STRING argument to STRING.An invalid argument was passed to a request.

Error ID: 3, Severity: ERROR, Facility: FPSRVERR

Invalid Time literal.A time literal is in an invalid format. If the ODBC data source is configured withEnforce ODBC Dates/Times checked, both digits of hour, minute, and secondmust be specified.

Error ID: 39, Severity: ERROR, Facility: FPSRVERR

Invalid Timestamp literal.A timestamp literal is in an invalid format. If the ODBC data source is configuredwith Enforce ODBC Dates/Times checked, all four digits of year and two digits ofmonth, day, hour, minute, and second must be specified.

Error ID: 40, Severity: ERROR, Facility: FPSRVERR

Invalid connection or statement option value.The client tried to set a connection or statement option to an invalid value.

Error ID: 43, Severity: ERROR, Facility: DBCAPERR

Page 124: UniVerse ODBC Guide

B-16 UniVerse ODBC Guide

Invalid cursor position.Error ID: 40, Severity: ERROR, Facility: DBCAPERR

Invalid datatype.Error ID: 35, Severity: ERROR, Facility: FPSRVERR

Invalid entry in character mapping file STRING line NUMBER.The indicated line in the character mapping file contains an error. Each entry linein a character map file has the following format: local = remote. local and remote are8-bit character code values in the range 1–255, and the codes for ASCII a–z, A–Z,0–9, and !%*.<=>_ cannot be mapped. Check the indicated line in the indicated filefor extraneous characters, invalid values, or conflicts with other lines. The systemhas ignored this line in setting up the character map.

Error ID: 11, Severity: INFORMATION, Facility: XIOERR

Invalid monetary unit STRING.The monetary unit specified is not a recognized monetary unit. Consult documen-tation on the money data type for allowable monetary units.

Error ID: 39, Severity: ERROR, Facility: DATUMERR

Invalid number.A string is not in a recognizable numeric format and cannot be converted to anumber.

Error ID: 17, Severity: ERROR, Facility: FPSRVERR

Invalid or unrecognized character.Error ID: 24, Severity: ERROR, Facility: FPSRVERR

Invalid procedure created.The procedure was created but errors were encountered. Errors could includeinvalid parameters, compilation errors, and so on.

Error ID: 48, Severity: WARNING, Facility: FPSRVERR

Invalid response message.This usually indicates incompatible client and server programs. Verify that clientand server program versions are compatible.

Error ID: 3, Severity: SEVERE, Facility: LINKERR

Invalid string or buffer length.Error ID: 60, Severity: ERROR, Facility: DBCAPERR

Page 125: UniVerse ODBC Guide

Error Messages B-17

Licensing Error: MESSAGE.This error occurred while trying to establish a license for UniVerse ODBC. Formore information about UniVerse licensing, see Administering UniVerse or contactArdent Customer Support.

Error ID: 75, Severity: ERROR, Facility: DBCAPERR

Licensing error: STRING.This error occurred while trying to establish a license for UniVerse ODBC. Formore information regarding UniVerse licensing, see Administering UniVerse orcontact Ardent Customer Support.

Error: 75, Severity: ERROR, Facility: DBCAPERR

Line NUMBER, column NUMBER: STRING.Error ID 33 should not appear; message text was used when constructing othererrors.

Error ID: 33, Severity: INFORMATION, Facility: FPSRVERR

Line NUMBER, column NUMBER (around " STRING"): STRING.Error ID 34 should not appear; message text was used when constructing othererrors.

Error ID: 34, Severity: INFORMATION, Facility: FPSRVERR

Link Parameters for asynchronous connections must start with "COM n:"The link parameters entry in the configuration file does not begin with COM n:.Use STAR/Config to check the link parameter format.

Error ID: 119, Severity: SEVERE, Facility: LINKERR

Link Type field missing in configuration file.The Link Type field in the configuration file entry for this database is empty. It wasprobably deleted or misspelled during editing. Use STAR/Config to enter a validlink type entry.

Error ID: 19, Severity: SEVERE, Facility: LINKERR

Local system error.Some local client problem occurred while an application was reading or writingstreamed data to or from the network. Reconcile the external error number againstyour operating system’s socket I/O error number list for more details.

Error ID: 6, Severity: FATAL, Facility: XIOERR

Page 126: UniVerse ODBC Guide

B-18 UniVerse ODBC Guide

No cursor of the specified name.A reference to a cursor by name failed because there is no cursor with the specifiedname.

Error ID: 20, Severity: ERROR, Facility: DBCAPERR

No data to read from file or pipe.A nonblocking read on a pipe or stream found no data available.

Error ID: 12, Severity: ERROR, Facility: OIOERR

No more database cursors available.All the available database cursors are in use on this connection and none is avail-able. Close one or more other cursors and retry the operation.

Error ID: 4, Severity: ERROR, Facility: FPSRVERR

No more result sets available.All the result sets for this request have already been returned. There are no moreresult sets available.

Error ID: 8, Severity: INFORMATION, Facility: FPSRVERR

No more Windows timers left.All the available Windows timers are in use on this serial connection. Close otherWindows applications or exit and reenter Windows.

Error ID: 113, Severity: SEVERE, Facility: LINKERR

Number too big.A numeric literal is longer than 254 characters.

Error ID: 28, Severity: ERROR, Facility: FPSRVERR

Numeric conversion or arithmetic expression error fetching column.A numeric conversion or arithmetic expression error occurred while an applica-tion was fetching a value from a column. A null value was returned.

Error ID: 64, Severity: ERROR, Facility: DBCAPERR

Numeric data truncated entering or leaving the database.Numeric data was truncated while entering or leaving the database.

Error ID: 50, Severity: WARNING, Facility: DBCAPERR

Page 127: UniVerse ODBC Guide

Error Messages B-19

Numeric overflow.The numeric conversion failed because the number was too large to be representedin the destination format.

Error ID: 14, Severity: WARNING, Facility: XIOERR

Numeric underflow.The numeric conversion failed because the number was too small to be repre-sented in the destination format.

Error ID: 15, Severity: WARNING, Facility: XIOERR

Numeric value out of range.The supplied buffer is too small to hold the integer part of the requested numericvalue. Provide a larger character buffer or a buffer of a numeric type with a largerrange.

Error ID: 29, Severity: ERROR, Facility: OIOERR

Object input data format error: versions incompatible.Your software tried to read object data that was created by a more recent versionof the product. The data in question was probably a saved query file.

Error ID: 22, Severity: ERROR, Facility: OIOERR

ODBC-compliance syntax error.A non-ODBC construct has been encountered at the indicated line and columnnumber of the SQL statement. Verify that the SQL statement follows proper ODBCSQL syntax.

Error ID: 51, Severity: ERROR, Facility: FPSRVERR

ODBC escape clause not properly terminated.Error ID: 21, Severity: ERROR, Facility: FPSRVERR

Old request to a FastPath server. This error was probably caused by thepresence of a –S string (–SODBC) in the parameter field of this STAR/ Configentry.The UniVerse ODBC server received a request from a pre-3.0 release of a UniVerseODBC client product. This probably happened because the parameter field in theSTAR/ Config entry for this connection contains an –S string (such as–SODBC).

Error ID: 50, Severity: ERROR, Facility: FPSRVERR

Page 128: UniVerse ODBC Guide

B-20 UniVerse ODBC Guide

Operation canceled.Error ID: 44, Severity: ERROR, Facility: DBCAPERR

Operation has been canceled.The request was interrupted and cancelled. Results from the cancelled request maynot be reliable.

Error ID: 49, Severity: ERROR, Facility: FPSRVERR

Out of memory.The client or server has run out memory. Reduce the size of the result set yourequest, close other database connections with large query result sets, or closedown other Windows applications that are consuming memory, then retry theoperation. If this message persists, you may need to shut down Windows andrestart it or reboot your PC or server. If this message occurs frequently, you needmore memory on your PC or more virtual memory on your data source.

Error ID: 1, Severity: FATAL, Facility: MEMERR

Out of result memory in the client.The result set of a query will not fit in available client memory. Reduce the size ofthe result set you request, close other database connections with large query resultsets, or close down other Windows applications that are consuming memory, thenretry the operation. If this message persists, you may need to shut down Windowsand restart it or reboot your PC. If this message occurs frequently, you need morememory on your PC.

Error ID: 2, Severity: SEVERE, Facility: LINKERR

Out of sequence request.The request could not be performed because prerequisite requests have not yetbeen made.

Error ID: 47, Severity: ERROR, Facility: FPSRVERR

Overflow converting a value to a numeric type.A text- or number-to-number conversion failed because the number was too largeto be represented in the specified format.

Error ID: 24, Severity: ERROR, Facility: DATUMERR

Path truncated.You typed a value that was longer than a valid path plus filename. The value wastruncated to the maximum length defined for the column. This message is infor-

Page 129: UniVerse ODBC Guide

Error Messages B-21

mational only, and requires no further action.

Error ID: 30, Severity: WARNING, Facility: DATUMERR

Premature EOF reading file.End-of-file was reached while an application was prematurely reading data froma file.

Error ID: 13, Severity: ERROR, Facility: OIOERR

Read from invalid file.An attempt was made to read from an invalid file descriptor.

Error ID: 9, Severity: ERROR, Facility: OIOERR

Read permission denied.An attempt to read a file failed because you have no access rights to the file.

Error ID: 10, Severity: ERROR, Facility: OIOERR

Received unexpected data: STRING.An event on the data source system caused unexpected data to be sent over thenetwork. Usually this indicates that the server process has terminated, and theunexpected data is a message indicating what happened. Try again.

This error can also happen if the shell configuration scripts on your UNIX hostecho data to the terminal. In this case, you must modify the scripts to move orremove the terminal-accessing commands.

If this problem persists, contact Ardent Customer Support.

Error ID: 7, Severity: SEVERE, Facility: LINKERR

Receive timeout, closing connection.The UniVerse ODBC client gave up waiting for data from the host server. The hostsystem is either very slow or has failed, or the host server program has failed.Contact your system administrator.

Error ID: 16, Severity: FATAL, Facility: OIOERR

Receive timeout, closing connection.The UniVerse ODBC client gave up waiting for data from the host server. The hostsystem is either very slow or has failed, or the host server program has failed.Contact your system administrator.

Error ID: 5, Severity: FATAL, Facility: XIOERR

Page 130: UniVerse ODBC Guide

B-22 UniVerse ODBC Guide

Restricted data type attribute violation.The data value cannot be converted to the C data type specified by the argumentfCType.

Error ID: 27, Severity: ERROR, Facility: OIOERR

Serialization failure.The transaction to which the prepared statement belonged was terminated toprevent deadlock.

Error ID: 39, Severity: ERROR, Facility: DBCAPERR

Server connection closed by host.The UniVerse ODBC server process has terminated abnormally. This could becaused by the host computer being rebooted, or it could indicate a problem in theserver such as not properly entering the PC’s TCP/IP address in the server’s hostfile. Check that the server is running. Disconnect and reconnect. If that fails, rebootthe PC.

Error ID: 100, Severity: SEVERE, Facility: LINKERR

Server received an increment of input character data longer than the definedchunk length.The server received an increment of input character data longer than the definedchunk length. The data was right-truncated.

Error ID: 11, Severity: WARNING, Facility: DBCAPERR

SQL numeric value out of range.An SQL statement contained a numeric parameter or literal that was out of rangefor its context.

Error ID: 12, Severity: ERROR, Facility: DBCAPERR

SQL numeric value out of range.An SQL statement contained a numeric parameter or literal that was out of rangefor its context.

Error ID: 69, Severity: WARNING, Facility: DBCAPERR

SQL REVOKE failed because of insufficient privilege.The user had insufficient privilege to revoke a privilege for another user.

Error ID: 5, Severity: ERROR, Facility: DBCAPERR

Page 131: UniVerse ODBC Guide

Error Messages B-23

SQL statement contained ambiguous column reference.An SQL statement used a column name that had more than one possible referent.The statement probably contained a join in which two tables each had a columnwith that name.

Error ID: 73, Severity: ERROR, Facility: DBCAPERR

SQL statement referenced a nonexistent column in a table or view.Error ID: 31, Severity: ERROR, Facility: DBCAPERR

SQL statement referenced a nonexistent index.Error ID: 29, Severity: ERROR, Facility: DBCAPERR

SQL statement referenced a nonexistent table or view.Error ID: 27, Severity: ERROR, Facility: DBCAPERR

SQL statement used undefined table name.An SQL statement used tablename.columnname or tablename.* but did not correctlyuse tablename elsewhere in the statement—for example, in the FROM clause.

Error ID: 74, Severity: ERROR, Facility: DBCAPERR

SQL Syntax error.The database reported an SQL syntax error.

Error ID: 21, Severity: ERROR, Facility: DBCAPERR

Stack overflow (lexer).The SQL statement contains too many levels of nested escape sequences.

Error ID: 41, Severity: ERROR, Facility: FPSRVERR

String data/length mismatch.Less character data was provided than was promised for filling in an input param-eter.

Error ID: 16, Severity: ERROR, Facility: DBCAPERR

STRING is illegal in ODBC SELECT...FOR UPDATE statements.In the ODBC SQL grammar, only a limited form of the SELECT statement can beused with FOR UPDATE.

Error ID: 64, Severity: ERROR, Facility: FPSRVERR

Page 132: UniVerse ODBC Guide

B-24 UniVerse ODBC Guide

STRING is not a valid UniVerse account or schema.The UniVerse account is not valid. If an account pathname was specified, verifythat the directory exists and is a UniVerse account. If an account name was speci-fied, verify that the UV.ACCOUNT entry is correct. If an SQL schema name wasspecified, verify that the UV_SCHEMA entry is correct.

Error ID: 76, Severity: ERROR, Facility: DBCAPERR

Support for link type STRING is not installed.Either the Link Type field entry in the configuration file is misspelled, or the .DLLfile for the link type driver has not been installed. Run STAR/Config to check thespelling in the configuration file. Then verify that the desired link type driver hasbeen installed correctly. Last, try to reinstall the link type driver.

Error ID: 1, Severity: SEVERE, Facility: LINKERR

Support for link type STRING to database type STRING is not available.Access to this database type by this link type is either not supported or notinstalled. Use STAR/Config to check the spelling of the Link Type and DatabaseType field entries in the configuration file. Check the UniVerse ODBC serverrelease notes to see whether this link type is supported for this database type. Ifthis link type is supported by a DLL, try reinstalling the .DLL file.

Error ID: 22, Severity: SEVERE, Facility: LINKERR

Support for local database STRING is not installed.Either the Database Type field entry in the configuration file is misspelled, or the.DLL file for the local database type has not been installed. Run STAR/Config tocheck the spelling in the configuration file. Then verify that the desired local datasource has been installed correctly. Last, try to reinstall the local data source.

Error ID: 12, Severity: SEVERE, Facility: LINKERR

Syntax error.A syntax error has been discovered at the indicated line and column number of theSQL statement. Verify that the SQL statement follows proper ODBC SQL syntax.

Error ID: 29, Severity: ERROR, Facility: FPSRVERR

Table name or correlation name conflicts with UniVerse ODBC’s correlationname cookie <STRING>, so cannot be used.UniVerse ODBC sometimes generates correlation names of the form <correlationname cookie><n>, where n is a nonnegative integer. You cannot use a table orcorrelation name that also has this form.

Error ID: 60, Severity: ERROR, Facility: FPSRVERR

Page 133: UniVerse ODBC Guide

Error Messages B-25

TCP driver software not loaded.The TCP/IP driver is not running, or the client TCP/IP driver software has notbeen loaded. Check to see if the networking software is installed properly. Rein-stall the UniVerse ODBC client software. Make sure that the required changeshave been made to your AUTOEXEC.BAT and WIN.INI files.

Error ID: 111, Severity: SEVERE, Facility: LINKERR

TCP error.Other error messages (including strange character sequences) typically indicatethat the port number in the Link Parameters field in the configuration file is incor-rectly specified; you have connected to a service other than the rexec daemon(UNIX).

Use UniVerse ODBC Config to check the port number of the rexec or autostartdaemon or service (typically 512).

Retry the connection. If this fails, reboot your PC and try again. If this fails, checkto see if the host and its TCP/IP inetd, rexec, or autostart daemon are running.

Error ID: 110, Severity: SEVERE, Facility: LINKERR

Text truncated.You typed a value that was longer than the space provided by the database forvalues in this column. The value was truncated to the maximum length defined forthe column. This message is informational only, and requires no further action.

Error ID: 10, Severity: WARNING, Facility: DATUMERR

Text truncated to 63,950 characters.Because the Text class is currently implemented using far pointers (instead of hugepointers), it is not possible to create a Text class containing more than 63,950 char-acters. If you need to store more than 63,950 characters of textual information, youmight want to consider storing the text as binary data (using the Binary class).

Error ID: 44, Severity: WARNING, Facility: DATUMERR

The configuration file STRING is incorrectly formatted.The specified configuration file has missing or incorrect column names. UseUniVerse ODBC Config or HSDSetDatabases to recreate the configuration file.

Error ID: 1, Severity: ERROR, Facility: OCLIERR

The database reported an error when attempting to access this data item.Error ID: 54, Severity: ERROR, Facility: DBCAPERR

Page 134: UniVerse ODBC Guide

B-26 UniVerse ODBC Guide

The minutes and seconds parts of this date/time have been set to 0.You typed a date and hours value for a column that is defined to include both adate and a complete time. The unspecified time portions have been set to 0. Thismessage is informational only, and requires no further action.

Error ID: 18, Severity: WARNING, Facility: DATUMERR

The name STRING violates ODBC rules for names.The ODBC 2.0 standard requires names of database objects to begin with a letter,and to contain only letters, digits, and the underscore character.

Error ID: 53, Severity: ERROR, Facility: FPSRVERR

The number did not fit within the specified precision; it was rounded off.You typed a value that has more significant digits than the precision specified forits column. The number you typed was rounded off to fit within the column’sdefined precision. This message is informational only, and requires no furtheraction.

Error ID: 27, Severity: WARNING, Facility: DATUMERR

The number is too large; it was rounded to infinity.You typed a value that was larger than the precision specified for its column.Because the column supports infinite values, the number you typed was convertedto infinity. This message is informational only, and requires no further action.

Error ID: 25, Severity: WARNING, Facility: DATUMERR

The operation modified or deleted all rows in the table.An UPDATE or DELETE statement affected every row in the table, possiblybecause it had no WHERE clause.

Error ID: 34, Severity: WARNING, Facility: DBCAPERR

The requested operation was inapplicable to the specified cursor.The requested operation was invalid on the specified cursor. Examples: UPDATEwas positioned before FETCH; column attributes werer on a non-SELECT state-ment.

Error ID: 18, Severity: ERROR, Facility: DBCAPERR

The requested value is not available.Error ID: 46, Severity: ERROR, Facility: FPSRVERR

Page 135: UniVerse ODBC Guide

Error Messages B-27

The Schema (UVSCHEMA) defining the catalog could not be accessed.Error ID: 57, Severity: ERROR, Facility: DBCAPERR

The Schema defined by the client does not exist or could not be accessed.Error ID: 55, Severity: ERROR, Facility: DBCAPERR

The search pattern argument STRING contains an escape character which isnot itself escaped and which is not followed by %, _, or the escape character.UniVerse ODBC’s interpretation of ODBC is that in search pattern arguments tocatalog functions, every escape character that is not itself escaped must befollowed by %, _, or the escape character.

Error ID: 52, Severity: ERROR, Facility: FPSRVERR

The seconds part of this date/time has been set to 0.You typed a date and hours/minutes value for a column that is defined to includeboth a date and a complete time. The unspecified time portions have been set to 0.This message is informational only, and requires no further action.

Error ID: 19, Severity: WARNING, Facility: DATUMERR

The server does not support the requested function.Error ID: 25, Severity: ERROR, Facility: DBCAPERR

The server executable failed: STRING.The data source could not be executed. If the words START OKappear in the errormessage but not CAPSULE OK, it means that the server has been installed incor-rectly. Often, the message string following the message indicates the reason why.

This error can also happen if you have edited the server startup script in such away that it echoes data to standard output. If the words START OKand CAPSULEOKappear in the error message, the offending output comes between them. In thiscase, you must modify the server startup script to redirect or remove thecommands that perform output.

Check the server startup script. Then, verify that the data source has been installedcorrectly. Last, try to reinstall the data source.

If this problem persists, contact Ardent Customer Support.

Error ID: 9, Severity: SEVERE, Facility: LINKERR

The server start-script failed: STRING.The data source startup script could not be executed. Either the Database Serverfield entry in the configuration file is misspelled, or the server has been installed

Page 136: UniVerse ODBC Guide

B-28 UniVerse ODBC Guide

incorrectly.

Often the message string following the message indicates the reason why.

This error can also happen if the shell configuration scripts on your UNIX hostecho data to the terminal. If you see the words START OKnear the end of the errormessage, the offending output precedes it. In this case you must modify the scriptsto move or remove the terminal-accessing commands.

Use UniVerse ODBC Config to check the spelling of the System Name in theconfiguration file. Then, verify that the data source has been installed correctly.Use the rsh `hostname` echo good test to verify your UNIX shell configura-tion files. Last, try to reinstall the database server.

If this problem persists, contact Ardent Customer Support.

Error ID: 8, Severity: SEVERE, Facility: LINKERR

The Table defined by the client does not exist or could not be accessed.Error ID: 56, Severity: ERROR, Facility: DBCAPERR

The table expansion/explosion was halted at the row limit of NUMBER rows.Expansion/explosion of the table would generate more than the specified numberof rows. The expanded/exploded table was limited to this number of rows anddoes not represent all the underlying data.

Error ID: 38, Severity: INFORMATION, Facility: DATUMERR

The Table of Columns (UVCOLUMNS) in the Catalog could not be accessed.Error ID: 59, Severity: ERROR, Facility: DBCAPERR

The Table of Tables (UVTABLES) in the Catalog could not be accessed.Error ID: 58, Severity: ERROR, Facility: DBCAPERR

The time part of this date/time has been set to midnight.You typed a date value for a column that is defined to include both a date and atime. The time portion has been set to 0, which represents midnight. This messageis informational only, and requires no further action.

Error ID: 17, Severity: WARNING, Facility: DATUMERR

The transaction isolation level cannot be changed during an open transac-tion.The transaction isolation level cannot be changed during an open transaction. Thecurrent transaction must be committed or rolled back before the transaction isola-

Page 137: UniVerse ODBC Guide

Error Messages B-29

tion level can be changed.

Error ID: 72, Severity: ERROR, Facility: DBCAPERR

The underlying database does not provide support for output parameters.Error ID: 52, Severity: ERROR, Facility: DBCAPERR

The UV/ODBC server or the underlying database do not provide support forthe requested SQL statement.The UniVerse ODBC server or the underlying database does not provide supportfor the requested SQL statement.

Error ID: 49, Severity: ERROR, Facility: DBCAPERR

The UV/ODBC server or the underlying database do not provide therequested feature.Error ID: 33, Severity: ERROR, Facility: DBCAPERR

The year in this date must be AD.You typed a date/time value whose year is BC (negative), but the date/timecolumn can support only AD (positive) years.

Error ID: 15, Severity: ERROR, Facility: DATUMERR

This SQL statement was ignored.This SQL statement is not supported by the underlying database. This SQL state-ment was not executed by the UniVerse ODBC server. Success with information isreturned instead of an error because some applications abort if an attemptedexecution of this type of SQL statement returns an error.

Error ID: 63, Severity: WARNING, Facility: DBCAPERR

Too many open sockets.The connection could not be made because all available TCP/IP sockets are in use.This can happen if many TCP/IP service sessions (telnet, ftp) or many UniVerseODBC connections are open. Close one or more telnet, ftp, or UniVerse ODBCconnections. You may be able to configure your TCP/IP software package toprovide more concurrent sockets. See your PC TCP/IP package documentation.

Error ID: 122, Severity: SEVERE, Facility: LINKERR

Too many sockets open.The local PC limit on the number of concurrently open sockets has been reached.This can occur if there are several concurrent sessions active over the TCP-

Page 138: UniVerse ODBC Guide

B-30 UniVerse ODBC Guide

IP/Ethernet connection, including telnet, ftp, and NFS.

Exit one or more of the concurrent application sessions and try again. If this fails,reboot your PC and try again.

Error ID: 106, Severity: SEVERE, Facility: LINKERR

Transmit timeout, closing connection.No acknowledgment has been received from the host/server for the last messagesent. The connection has been closed. Retry the connection.

Error ID: 120, Severity: SEVERE, Facility: LINKERR

UCI Error. Func: SQL Connect(); State: IM002; UniVerse code: 0; Msg:[Ardent][SQL Client]The data source is not in configuration file.On Windows NT Version 3.51, UniVerse ODBC accesses UniVerse using the<localpc> UCI data source defined in the UniVerse uvodbc.config file. This datasource definition is added to uvodbc.config by the UniVerse ODBC server installa-tion process. If UniVerse is then removed and reinstalled, the <localpc> datasource definition will no longer exist and attempts to establish connections withthe UniVerse ODBC server will fail with the above error. To restore the <localpc>data source definition in uvodbc.config, you must reinstall the UniVerse ODBCserver.

Error ID: 46, Severity: ERROR, Facility: DBCAPERR

UCI Error. Func: STRING; State: STRING; UniVerse code: NUMBER; Msg:STRING.A UCI error was encountered. See UniVerse Call Interface Guide to learn more aboutthis error.

Error ID: 46, Severity: ERROR, Facility: DBCAPERR

UCI Warning Func: STRING; State: STRING; UniVerse code: NUMBER; Msg:STRING.A UCI warning was encountered. See UniVerse Call Interface Guide to learn moreabout this warning.

Error ID: 47, Severity: WARNING, Facility: DBCAPERR

Unable to convert an IEEE NaN.There is no way to convert an IEEE NaN value into the destination format.

Error ID: 18, Severity: WARNING, Facility: XIOERR

Page 139: UniVerse ODBC Guide

Error Messages B-31

Unable to convert an IEEE denormal.There is no way to convert an IEEE denormal value into the destination format.

Error ID: 17, Severity: WARNING, Facility: XIOERR

Unable to convert an IEEE infinity.There is no way to convert an IEEE infinity value into the destination format.

Error ID: 19, Severity: WARNING, Facility: XIOERR

Unable to determine the current schema for this connection.Either no schema has been created for this account or the current schema could notbe determined for this account from the account information provided in theAccount field in the Database server/Authorization Information section of theconfiguration file entry.

Error ID: 53, Severity: ERROR, Facility: DBCAPERR

Uni RPC daemon is not running. Startup this daemon from the UniVerseSystem Administration menu before attempting to use UV/ODBC.The UniRPC daemon must be running in order for UniVerse ODBC to establish aconnection with UniVerse. The UniRPC daemon can be started from the UniVerseSystem Administration menu in the UV account. The UniRPC service can bestarted from the Windows NT Control Panel, the UniVerse Control Panel, or froman MS-DOS window.

Error ID: 71, Severity: ERROR, Facility: DBCAPERR

UniVerse SQL does not support UNION with FOR UPDATE.Error ID: 65, Severity: ERROR, Facility: FPSRVERR

Unknown attribute type streamed or domain/range overflow occurred.An attempt to read a file or connect to a server failed. This most likely happenedbecause of incompatible software versions, communications errors, or data filecorruption.

Error ID: 10, Severity: FATAL, Facility: XIOERR

Unknown data type.An unknown ODBC data type has been passed.

Error ID: 2, Severity: ERROR, Facility: FPSRVERR

Unterminated quoted string.A quoted string is missing a closing single or double quotation mark.

Page 140: UniVerse ODBC Guide

B-32 UniVerse ODBC Guide

Error ID: 18, Severity: ERROR, Facility: FPSRVERR

User does not have permission to execute this SQL statement.Error ID: 23, Severity: ERROR, Facility: DBCAPERR

UV/ODBC BASIC program STRING failed to execute: [ STRING] STRING.UniVerse ODBC’s attempt to execute a cataloged BASIC helper program failed forthe reason mentioned. This could indicate a file access problem or an invalidUniVerse ODBC installation.

Error ID: 55, Severity: ERROR, Facility: FPSRVERR

UV/ODBC BASIC program STRING reported error: STRING.A UniVerse ODBC cataloged BASIC program encountered this error whilecollecting information about UniVerse tables or files.

Error ID: 56, Severity: WARNING, Facility: FPSRVERR

Note: This error message actually describes a warning from a BASIC program,not an error.

UV/ODBC BASIC program STRING reported error: STRING.A cataloged BASIC program encountered this error while collecting informationabout UniVerse tables or files.

Error ID: 59, Severity: ERROR, Facility: FPSRVERR

UV/ODBC cannot describe the result set of a UniVerse procedure which hasnot been executed.You requested information about the result set of a UniVerse procedure which hasbeen prepared, but not yet executed. This information cannot be determined untilyou actually execute the procedure.

Error ID: 63, Severity: ERROR, Facility: FPSRVERR

UV/ODBC dictionary cannot prepare SQL statement [ STRING].UniVerse ODBC extracts information about columns of database tables from thisdatabase by preparing an SQL statement for execution. The database rejected theSQL statement, probably because access privileges were inadequate.

Error ID: 58, Severity: WARNING, Facility: FPSRVERR

UV/ODBC’s file access control prevents writing to this file.The user attempted to write to a file whose accessibility was specified in the

Page 141: UniVerse ODBC Guide

Error Messages B-33

HS_FILE_ACCESS file as READ or NONE.

Error ID: 54, Severity: ERROR, Facility: FPSRVERR

Write to invalid file.An attempt was made to write to an invalid file descriptor.

Error ID: 17, Severity: ERROR, Facility: OIOERR

Write to invalid pipe.An attempt was made to write to a pipe not open for writing.

Error ID: 18, Severity: ERROR, Facility: OIOERR

Wrong number of input parameters to SQL statement.The client application provided more, or fewer, parameter values than there wereplace holders in the SQL statement.

Error ID: 41, Severity: ERROR, Facility: DBCAPERR

Page 142: UniVerse ODBC Guide

B-34 UniVerse ODBC Guide

Page 143: UniVerse ODBC Guide

ODBC Environment Variables C-1

CODBC

Environment Variables

The UniVerse ODBC server provides features you can configure through environ-ment variables.

On UNIX systems: Environment variables are set in the hs_environ file, located inthe uvodbc subdirectory of the UV account directory.

Create one line in hs_environ for each variable you want to set. Use Bourne shellsyntax such as the following:

TMPDIR=/my/tmp/directory; export TMPDIRHS_NAME_MAPPING=NO; export HS_NAME_MAPPING

On Windows NT systems: Environment variables are set in the Windows NTRegistry under the following key:

HKEY_LOCAL_MACHINE\Ardent Software\UniVerse\CurrentVersion\UniVerseODBC Server

To view or change them, use a registry editor such as Microsoft Registry Editor(regedit.exe).

Note: Ardent Technical Support may advise you to start the UniVerse ODBCserver manually using the –s option, for troubleshooting. In this case,UniVerse ODBC does not read hs_environ or the Registry. Instead it getsthe variables directly from the environment of the user who started theserver. On UNIX systems these are set using the user’s shell. OnWindows NT systems they are usually set in the Environment section ofthe System Properties window, accessed through the System icon in theControl Panel.

Page 144: UniVerse ODBC Guide

C-2 UniVerse ODBC Guide

Note: When the server is started using rexec processing, the Windows NTRegistry entries under the ARDENT key take precedence over the valuesset in the Control Panel.

Table C-1 lists the UniVerse ODBC environment variables on UNIX systems.

Table C-1. UniVerse ODBC Environment Variables (UNIX)

Environment Variable Default Controls…

HS_NAME_MAPPING YES Whether UniVerse ODBC auto-matically maps UniVerse schema,table, view, file, column, and fieldnames to conform with ODBCnaming restrictions.

HS_RETRY_AS_UV_SQL NO Whether UniVerse ODBC passesthrough statements it cannotinterpret as ODBC SQL. For moreinformation, see “SQL-RelatedConnection Options” onpage A-14.

HS_USE_FILEINFO YES Whether UniVerse ODBC uses itsfile information cache to constructthe list of accessible ODBC tables.This variable is used only with3.0.x versions of the UniVerseODBC client; later versions of theclient ignore it and use the clientconnection option FastCon-nect/Refresh OTL on Connectinstead.

SERVER <uv.acct.dir>/uvodbc/bin/uvosrv.exe

Path of the UniVerse ODBC serverexecutable. This is set automati-cally at installation, so you shouldnot need to change it.

TMPDIR /tmp The name of the directory theserver uses to contain temporaryfiles such as debug log files.

UVFPDELAY 0 A delay in the UniVerse ODBCconnection sequence, measured inseconds.

Page 145: UniVerse ODBC Guide

ODBC Environment Variables C-3

Table C-2 lists the UniVerse ODBC environment variables on Windows NTsystems.

Table C-2. UniVerse ODBC Environment Variables (Windows NT)

Environment Variable Default Controls…

HS_NAME_MAPPING YES Whether UniVerse ODBC auto-matically maps UniVerse schema,table, view, file, column, and fieldnames to conform with ODBCnaming restrictions.

HS_RETRY_AS_UV_SQL NO Whether UniVerse ODBC passesthrough statements it cannotinterpret as ODBC SQL. For moreinformation, see “SQL-RelatedConnection Options” onpage A-14.

HS_USE_FILEINFO YES Whether UniVerse ODBC uses itsfile information cache to constructthe list of accessible ODBC tables.This variable is used only with3.0.x versions of the UniVerseODBC client; later versions of theclient ignore it and use the clientconnection option FastCon-nect/Refresh OTL on Connectinstead.

HYPERDIR <uv.acct.dir>\uvodbc Path of the working directory ofthe UniVerse ODBC server. This isset automatically by the UniVerseinstaller, so you should not needto change it.

LINKPORT 512 The port on which the REXECservice listens for connections.Corresponds to the "REXECservice port number" field inUniVerse ODBC Config.

SERVER <uv.acct.dir>\uvodbc\bin\uvosrv.exe

Path of the UniVerse ODBC serverexecutable. This is set automati-cally at installation, so you shouldnot need to change it.

TEMP The name of the directory theserver uses to contain temporaryfiles such as debug log files.

UVFPDELAY 0 A delay in the UniVerse ODBCconnection sequence, measured inseconds.

Page 146: UniVerse ODBC Guide

C-4 UniVerse ODBC Guide

On Windows NT systems, the TEMP directory is one that probably is shared bymany other Windows NT applications as a standard location for temporary files.It can be:

• The directory specified by the environment variable TMP in the environ-ment of the user who installed UniVerse, if set

• The directory specified by the environment variable TEMP in theenvironment of the user who installed UniVerse, if set

• The Windows NT directory

Page 147: UniVerse ODBC Guide

Server Process Log Files D-1

DServer Process Log Files

UniVerse ODBC maintains server process log files to monitor the progress ofservers and provide administrative feedback on the use of UniVerse ODBC. Theselog files are also useful for diagnosing problems.

For each connection, these log files contain information about startup andconnecting, followed by information about each client request paired with theserver’s response, in sequence. The log can also include messages generated bycertain server errors.

Server Process Log FilenamesServer process log filenames have the following format:

log.comms.yymmdd.hhmmss.pid

Saving and Examining the Server Process LogsUsually server process logs are temporary and are automatically deletedfollowing a client disconnect request and normal server exit. However, if a server-related error occurs, you may want to retain the log file to track down problems.To do so, instruct the user to use UniVerse ODBC Config to activate the CreateServer Debug Log setting for the appropriate configuration he or she is accessing,

comms The type of communication link over which this session occurred(TCP).

yymmdd Login date.

hhmmss Login time.

pid The UNIX process ID or the Windows NT Win32 process ID ofthe main server process.

Page 148: UniVerse ODBC Guide

D-2 UniVerse ODBC Guide

and then retry the connection. For more information about UniVerse ODBCConfig, see “Using UniVerse ODBC Config” on page 3-14.

Locating the Server Process LogsThis section describes where to find the server process log files.

UNIXThe server process log files are created in the directory specified by the user’sTMPDIR environment variable (usually /tmp) and are owned by whoever ran theserver.

If TMPDIR is not set or you want to redirect it to point to a different directory, youcan do so in one of two ways:

• Set TMPDIR in each UniVerse ODBC user’s shell configuration script (non-Bourne users only).

• Edit the UniVerse ODBC environments file (hs_environ) in the UniVerseODBC installation directory to set TMPDIR once for all UniVerse ODBCusers.

Whichever method you choose, select a directory on a file system with at least 2 to3 MB of disk space, and insert a command such as the following in your shellconfiguration scripts or in the hs_environ file.

Bourne shell:

TMPDIR=${TMPDIR:– path };export TMPDIR

C shell:

setenv TMPDIR path

path is the pathname of the directory that contains the server process logs.

Note: If you set TMPDIR in hs_environ, you must use the Bourne shell commandformat. Also, because hs_environ commands are executed by the serverstartup script, do not echo anything to stdout or ask questions from stdin inhs_environ. If, for debugging purposes, you must know how TMPDIR isset, enter the following command at the shell prompt:

# echo $TMPDIR > /tmp/environ.$$

Page 149: UniVerse ODBC Guide

Server Process Log Files D-3

Windows NTThe server process log files are created in the directory specified in the WindowsNT Registry under the subkey:

\HKEY_LOCAL_MACHINE\SOFTWARE\ArdentSoftware\UniVerse\CurrentVersion\UniVerse ODBC Server

These log files are owned by the user specified in the client’s configuration file.

Page 150: UniVerse ODBC Guide

D-4 UniVerse ODBC Guide

Page 151: UniVerse ODBC Guide

Sample Accounts E-1

ESample Accounts

This appendix provides details about the sample UniVerse accounts that theUniVerse ODBC installation script creates. It describes where to find them and theinformation they contain.

Locating the Sample UniVerse AccountsEach UniVerse ODBC server has two sample accounts, one called HS.SALES andone called HS.SERVICE. When UniVerse is installed, these sample accounts arecreated in the UV account directory, so you can use them to learn how to useUniVerse ODBC before working with your own data. The files for these accountsare located in two directories called HS.SALES and HS.SERVICE.

If you defined HS.SALES and HS.SERVICE as ODBC data sources using UniVerseODBC Config, they should be accessible to client products and sampleapplications.

Database DefinitionsThe HS.SALES and HS.SERVICE accounts each contain several files. Thefollowing sections list the files contained in each account, the columns found ineach file, and the relationships among the files.

Page 152: UniVerse ODBC Guide

E-2 UniVerse ODBC Guide

HS.SALES AccountThe HS.SALES account contains information about copiers and fax machines soldby a fictitious manufacturer. It contains information about sales prospects,customers who bought machines, details of their purchases, and the productspurchased. This information is typically used by the Sales department.

HS.SALES comprises three files: CUSTOMER, PRODUCTS, and STATES.

HS.SERVICE AccountThe HS.SERVICE account contains information about customer calls, commonlyreported problems, and products under maintenance. This information is typi-cally used by the Service department.

CUSTOMER PRODUCTS STATES

CUSTID PRODID CODE

SAL LIST NAME

FNAME DESCRIPTION

LNAME

COMPANY

ADDR1

ADDR2

CITY

STATE

ZIP

PHONE

PRODID

SER_NUM

PRICE

BUY_DATE

PAID_DATE

SVC_PRICE

SVC_START

SVC_END

SVC_PAID_DATE

Page 153: UniVerse ODBC Guide

Sample Accounts E-3

HS.SERVICE comprises three files: CALLS, PROBLEMS, and PRODS.

Sample DataThe following files show the sample data contained in the HS.SALES andHS.SERVICE accounts.

Note: If you update any of these files, the actual data you see can differ fromthese samples.

CALLS PROBLEMS PRODS

CALL_ID PROB_NUM PRODUCT

CUST_NUM PRODUCT VERSION

F_NAME VERSION DESCRIPTION

L_NAME PROB_DESCRIPTION FIRST_SHIP

PHONE STATUS

PROB_NUM FIX

PRODUCT NOTES

VERSION OCCURRENCES

SERIAL

CALLED_ON

CALL_DATE

CALL_TIME

CALL_MINUTES

PROBLEM

RESOLUTION

Page 154: UniVerse ODBC Guide

E-4 UniVerse ODBC Guide

CUSTOMER File – HS.SALES Account

CU

ST

ID

SA

L

FNA

ME

LN

AM

E

CO

MPA

NY

AD

DR

1

AD

DR

2

CIT

Y

STA

TE

ZIP

PH

ON

E

1 Mr. Samuel Smith Better Beer,Inc.

10 Commer-cial St

Concord NH 02131 (603)555-3212

2 Ms. Diana Morris Fast CopyCenter

431 ThirdAve.

Waltham MA 01133 (617)555-9823

3 Mr. David Argonne Fast CopyCenter

75 GreatRoad

Bedford MA 01182 (617)555-3468

4 Ms. Jill Kahn Fast CopyCenter

12 School St Boston MA 01103 (617)555-7396

5 Mr. Kenneth Williams Ocean StateFishCompany

837 OceanAve

Provi-dence

RI 03171 (401)555-6512

6 Ms. Betty Burke LightningComputerCorp.

400TechnologyPath

MS10-27

WhiteRiverJun

VT 01644 (802)555-9854

7 Dr. Martha Gill CentralHospital

555 MainStreet

Derry NH 04429 (603)555-5437

8 Mr. Steven Holland Copies, Inc. 4325 HillRoad

Lowell MA 01386 (508)555-2365

9 Ms. Nicole Orlando A1 UsedAuto

820MiddlesexTurnpike

Burlington MA 01173

10 Dr. Andrew McCaig HGT DentalCenter

999 HillRoad

Brattle-boro

VT 03356 (802)555-6534

11 Mr. Skip Lewis Skip’sWhaleWatch

10 DockStreet

Plymouth MA 01382 (508)555-2368

12 Mrs. Laurie Patry RusticPrinters

10 RusticTrail

Littleton MA 01142 (508)555-9426

Page 155: UniVerse ODBC Guide

Sample Accounts E-5

CUSTOMER File – HS.SALES Account (Continued)

CU

ST

_ID

PR

OD

ID

SE

R_N

UM

PR

ICE

BU

Y_D

AT

E

PAID

_DA

TE

1 M2000 501278 $4200 1991-01-07 1991-01-282 C2000 600782 $6600 1991-01-08 1991-02-052 M3000 700422 $12000 1991-01-08 1991-02-052 S3000 101456 $900 1991-01-22 1991-02-123 M2000 501310 $4250 1991-01-08 1991-01-104 C3000 800311 $16500 1991-01-09 1991-02-075 M1000 403485 $1900 1991-01-14 1991-02-145 M1000 403723 $1900 1991-02-15 1991-02-287 M2000 501233 $4490 1991-01-207 S2000 101212 $990 1991-01-208 M3000 700514 $1200 1991-01-21 1991-02-218 S3000 201399 $900 1991-01-21 1991-02-2110 M1000 203510 $1990 1991-01-28 1991-02-1410 M1000 203600 $1900 1991-01-29 1991-02-2810 C2000 600791 $6500 1991-01-30

CUSTOMER File – HS.SALES Account (Continued)

CU

ST

ID

PR

OD

ID

SE

R_N

UM

SV

C_P

RIC

E

SV

C_S

TAR

T

SV

C_E

ND

SV

C_P

AID

_DA

TE

1 M2000 501278 $600 1991-01-13 1992-01-15 1991-01-282 C2000 600782 $900 1991-01-13 1992-01-15 1991-02-053 M3000 700422 $500 1991-01-13 1992-06-12 1991-02-054 S3000 101456 $150 1991-01-13 1991-01-15 1991-02-125 M1000 403485 $600 1991-01-13 1991-06-12 1991-02-146 C3000 800311 $600 1991-01-13 1991-06-12 1992-02-079 M3000 700514 $1000 1991-02-03 1992-02-05 1991-02-21

Page 156: UniVerse ODBC Guide

E-6 UniVerse ODBC Guide

10 S3000 201399 $150 1991-02-03 1992-02-05 1991-02-2111 M1000 203600 $400 1991-02-03 1992-02-05 1991-02-2812 C2000 600791 $950 1991-02-15 1992-02-1913 M1000 403723 $600 1991-03-02 1991-08-07 1991-02-28

PRODUCTS File – HS.SALES Account

PRODID LIST DESCRIPTION

M1000 $1,990 Low cost, entry level, light duty, monocM2000 $4,490 Moderate duty monochrome copierC2000 $6,890 Moderate duty, entry level, color copierM3000 $12,990 Heavy duty monochrome copierC3000 $17,990 Heavy duty color copierS2000 $990 Sorting attachment for M2000/C2000S3000 $1,990 Sorting attachment for M3000/C3000

CUSTOMER File – HS.SALES Account (Continued)C

US

TID

PR

OD

ID

SE

R_N

UM

SV

C_P

RIC

E

SV

C_S

TAR

T

SV

C_E

ND

SV

C_P

AID

_DA

TE

Page 157: UniVerse ODBC Guide

Sample Accounts E-7

STATES File – HS.SALES Account

CODE NAME CODE NAME

AK Alaska MT MontanaAL Alabama NC North CarolinaAR Arkansas ND North DakotaAZ Arizona NE NebraskaCA California NH New HampshireCO Colorado NJ New JerseyCT Connecticut NM New MexicoDE Delaware NV NevadaFL Florida NY New YorkGA Georgia OH OhioHI Hawaii OK OklahomaIA Iowa OR OregonID Idaho PA PennsylvaniaIL Illinois RI Rhode IslandIN Indiana SC South CarolinaKS Kansas SD South DakotaKY Kentucky TN TennesseeLA Louisiana TX TexasMA Massachusetts UT UtahMD Maryland VA VirginiaME Maine VT VermontMI Michigan WA WashingtonMN Minnesota WI WisconsinMO Missouri WV West VirginiaMS Mississippi WY Wyoming

Page 158: UniVerse ODBC Guide

E-8 UniVerse ODBC Guide

CALLS File – HS.SERVICE Account

CU

ST

_NU

M

F_N

AM

E

L_N

AM

E

PH

ON

E

PR

OB

_NU

M

PR

OD

UC

T

VE

RS

ION

SE

RIA

L

CA

LL

ED

_ON

CA

LL

_MIN

UT

ES

PR

OB

LE

M

RE

SO

LU

TIO

N

2 Diana Morris (617)555-9823

4 C2000 1D 600782 1991-02-1413:45:01

2 Didn’t readthe manual

10 Andy McCaig (802)555-6534

M1000 2 203600 1991-02-059:05:04

4 Copierdoesn’twork inthemorning

Copier in10 minutewarm-upcycle;didn’t readmanualand under-stand theflashing’wait’ light

10 Andy McCaig (802)555-6534

M1000 2 203600 1991-02-0512:56:37

4 Linesdownthemiddleof thepage

Drumneedscleaning;servicetechniciandispatched.

1 Sam Smith (603)555-3212

5 M2000 1 501278 1991-03-029:32:45

3

2 Diana Morris (617)555-9823

7 M3000 2 700422 1991-02-1814:58:10

5

5 Ken Williams (401)555-6512

3 M1000 1 403485 1991-02-2015:30:02

2

5 Ken Williams (401)555-6512

8 M1000 1A 403723 1991-02-2411:12:52

8 Steve Holland (508)555-2365

7 C3000 2 700514 1991-02-2413:12:33

Staplerjams

Wasn’tusingproperkind ofstaples.

Page 159: UniVerse ODBC Guide

Sample Accounts E-9

PROBLEMS File – HS.SERVICE AccountP

RO

B_N

UM

PR

OD

UC

T

VE

RS

ION

PR

OB

_DE

SC

RIP

TIO

N

STA

TU

S

FIX

NO

TE

S

OC

CU

RR

EN

CE

S

1 S200 1 Sorter jams whencollating stapledcopies

fixed Cycle sorter powerbefore everycollated, stapledprint job

Fixed in rev 1A 15

2 M1000 1 Toner light won’tgo out, even afteradding moretoner

fixed Cycle power afteradding toner

Fixed in rev 2 4

3 M1000 1 Frequent paperjams

fixed Fan paper thor-oughly, don’t usemoist paper

Rev 2 papertray is muchbetter

27

4 C2000 1 Smeared colorsafter changingtoner cartridge

doc Make 20 copies ofcolor test sheetafter changingtoner

The manualnow recom-mends this asstandardprocedure

25

5 M2000 1 Paper jam lightindicates loca-tion 10, no paperjammed there

fixed Paper is jammedbetween locations 9and 10. Turn roller9 several times toright and removefrom location 10

Rev 1A showsboth locations 9and 10 for thiskind of jam

3

6 C3000 1 Smeared colorsafter changingtoner cartridge

doc Make 20 copies ofcolor test sheetafter changingtoner

The manualnow recom-mends this asstandardprocedure

17

7 M3000 2 Frequent orig-inal jams when 2-sided copyinglarge originals

pending Feeder needsservice. Shouldinstall ver. 2Afeeder long-lifeupgrade.

0

8 M1000 2 Wrong paper sizedisplayed whenusing 8.5x14paper tray

doc Use only rev2paper trays

Explained inrev 3 manual,page 10.

4

Page 160: UniVerse ODBC Guide

E-10 UniVerse ODBC Guide

PRODS File – HS.SERVICE Account

Product Version Description First_Ship

M1000 2 Low cost, entry level, light duty, monochromecopier. Rated 1000 pages/month. Annualservice recommended.

1991-01-31

M2000 1A Moderate duty monochrome copier. Rated10,000 pages/month. Bimonthly servicerecommended.

1991-02-14

C2000 1D Moderate duty, entry level, color copier. Rated10,000 pages/month. Bimonthly servicerecommended.

1991-02-14

M3000 2 Heavy duty monochrome copier. Rated 100,000pages/month. Monthly service recommended.

1990-04-05

C3000 3A Heavy duty color copier. Rated 100,000pages/month. Monthly service recommended.

1990-05-10

S2000 2 Sorting attachment for M2000/C2000 1991-01-30

S3000 2 Sorting attachment for M3000/C3000 1991-01-30

Page 161: UniVerse ODBC Guide

Character Mapping F-1

FCharacter Mapping

This appendix describes UniVerse ODBC’s ability to map character codes forcharacter string columns and currency symbols on the data source.

This capability supports data sources with character data encoded in nonstandardASCII-8 character codes, such as certain characters found on many Europeanterminals. Character mapping allows most character codes to be mapped todifferent codes. As a result, most character codes display the proper graphic, andyou can enter these characters using the keyboard in the Windows System char-acter set

Specify character mappings in a character mapping file on the server.

Creating the Character Mapping FileCreate and modify the character map file using any text editor (for example,WordPad on Windows NT or vi on UNIX).

Activating Character MappingActivate character mapping through a UniVerse ODBC client configurationoption (see the UniVerse Name Mapping option on page 3-10). To activate char-acter mapping on a UniVerse ODBC client:

1. Choose Start ➤ Programs ➤ Ardent UniVerse ➤ UVODBC Config to startup UniVerse ODBC Config and display the UniVerse ODBC ConfigurationEditor window.

2. Click Setup, then click the Optional tab.

3. Under Server, enter the following string in the Parameters field:

–cpathname

Page 162: UniVerse ODBC Guide

F-2 UniVerse ODBC Guide

pathname is the absolute or relative pathname for an existing character mapfile. If pathname begins with a slash (/), it is interpreted as an absolute path-name. On Windows NT systems, an absolute pathname can begin with a UNCshare name or a drive letter (for example, C: ). Otherwise, pathname is inter-preted as relative to the UniVerse ODBC server directory. For example, if theUniVerse ODBC server directory is /usr/ardent/uv/uvodbc, and pathname ismycharmap, the character map file path is /usr/ardent/uv/uvodbc/uv/mycharmap.

If you do not specify pathname, the default relative path charmap.hss isassumed.

4. Complete the procedure for setting up a character mapping file.

Setting Up the Character Mapping FileThis section describes how to set up a character mapping file.

Entry FormatsThe entries in a character mapping file have the following format:

client code = database code

client code and database code are values 1 through 255. Each value can be expressedas:

• Up to three decimal digits• The escape sequence \xhh for two hexadecimal digits• The escape sequence \ooo for three octal digits

Comments begin with /* and end with */.

Character Mapping GuidelinesUse the following guidelines for your character mapping file.

Permitted Character CodesOnly character codes other than those for the following characters can be mapped:

• A through Z• a through z• 0 through 9• The following characters:

! % . – < = > _

Page 163: UniVerse ODBC Guide

Character Mapping F-3

• The following spaces:– space– tab– linefeed– carriage return– formfeed

Character mappings must be one to one. That is, for each client or data sourcecharacter code there can be only one corresponding data source or client charactercode.

The character codes 251 through 255 are UniVerse system delimiters. They shouldnot be mapped. However, it is possible for other internal database codes to bemapped to 251 through 255 externally. For example, the following line maps theinternal character code 31 to the external character code 255 (which is ÿ):

255 = 31

However, the following example would cause UniVerse ODBC failures, becausethe character code 31 is not used externally (since it is a nonprinting control char-acter), and it maps to character 255, one of UniVerse’s system delimiters:

31 = 255

The following example shows a character mapping file:

/* Character map for PT250 ECMA-8 francais */ /* client char code = database char code */

163=35 /* British pound sign */35=163 /* sharp/hash/number sign */

224=64 /* a with grave accent */64=224 /* at-sign */

186=91 /* degree sign with underbar */91=186 /* left square bracket */

231=92 /* c with cedilla */92=231 /* backslash */

167=93 /* section sign */93=167 /* right square bracket */

181=96 /* Greek mu */96=181 /* left single-quote, grave accent */

Page 164: UniVerse ODBC Guide

F-4 UniVerse ODBC Guide

233=123 /* e with acute accent */123=233 /* left curly brace */

249=124 /* u with grave accent */124=249 /* vertical bar */

232=125 /* e with grave accent */125=232 /* right curly brace */

168=126 /* diaresis, umlaut */126=168 /* tilde */

Symmetrical Character MappingThe character mapping file in the previous example is symmetrical. That is,multiple pairs of characters are swapped in the character set. For example, theinternal database character code 35 represents the British pound sign (£), and thecharacter code 163 represents the hash sign (#). These two codes are swapped forpresentation on a PC. The external code 163 appears as the British pound sign inWindows.

We strongly recommend that character maps be symmetrical, leaving no possibledatabase character codes unmapped. Avoid creating character codes that are notswapped. For example, on the following line the internal database code 35 (theASCII hash sign) is mapped to the external code 163 (the ASCII-8 British poundsign):

163 = 35

If the database data also includes 163 codes, both appear as 163. This can result inupdate operations being disallowed because database data appears to havechanged. For each external (client) character code into which a database charactercode is mapped, make sure that one of the following conditions is met:

• The code does not appear in the database data.

• Internal codes with that value are mapped to another code that does notappear in normal database data.

Page 165: UniVerse ODBC Guide

Index-1

Symbols

&SELECTLISTS& file 4-10@ phrase 4-11, 4-20@ASSOC_KEY.mvname record 4-20@ASSOC_ROW column [email protected] record 4-18@SELECT phrase 4-11, 4-20

A

A- and S-descriptors 4-12About UniVerse ODBC Config menu

option 3-17accessing

accounts 4-1, 4-2, 4-3–4-5columns 4-2, 4-11fields 4-2, 4-11files 4-2, 4-5–4-11schemas 4-1, 4-2, 4-3–4-5System Administration menu 2-7tables 4-2, 4-5–4-11views 4-2, 4-5–4-11

account settings 3-19accounts

activating UniVerse ODBC fileaccess 2-5

making accessible 4-1, 4-2, 4-3–4-5sample

definitions E-1HS.SALES E-2HS.SERVICE E-2

Add button 3-16adding additional clients 3-13ALTER TABLE statement A-3API ODBC conformance 1-5

associating select lists 4-10association keys 4-19–4-20associations 4-19autocommit mode A-14

C

cache, file information 4-7Cancel button 3-21CASCADE qualifier A-2character columns 4-17character mapping F-1, F-2

installing F-1symmetrical F-4

charmap.hss file F-2client/server

testing communications 3-21testing connectivity 3-21

clientsadding additional 3-13software 3-1troubleshooting checklist 5-9UniVerse ODBC on UNIX 3-1verifying configuration 3-1

column aliases A-9columns

@ASSOC_ROW 4-19character 4-17making accessible 4-2, 4-11multivalued 4-3, 4-11

commandsHS.SCRUB 4-15

communicationsisolating problems 5-1manual verification 5-5

CONFIG.HSC configuration file 3-3

Index

Page 166: UniVerse ODBC Guide

Index-2 UniVerse ODBC Guide

CONFIG.HSC file 5-5CONFIGDIR environment

variable 3-24, 3-25, 5-4configuration files

creating 3-3defining 3-3distributing to users 3-12merging database entries 3-23overview 1-2running UniVerse ODBC Config to

maintain 3-3saving changes in 3-23setting permissions on 3-25sharing networked copy 3-13testing 3-21UCI 2-3Windows clients 3-3

configuration manager 1-3configuration parameters

MAXFETCHBUFF 2-4, 4-17MAXFETCHCOLS 2-4, 4-17

configurationscreating 3-3defining 3-3, 4-3editing 3-17testing 3-16, 3-17, 3-21

configuring UCI for UniVerseODBC 2-3

conformanceAPI 1-5ODBC 1-4

connection problems 5-7conversion codes 4-19conversion errors 4-18Copy menu option 3-16core grammar

CASCADE qualifier A-2LIKE USER keyword A-2ODBC SQL A-2qualified index names A-2RESTRICT qualifier A-2table name qualifiers in DDL A-2

CREATE INDEX statement A-2CREATE TABLE statement A-3creating

configurations 3-3ODBC data sources 3-5

Cut menu option 3-16

D

dataconversion errors 4-18dirty 4-19length 4-3multivalued 4-3

data types 4-3, 4-16–4-17SQL A-1–A-2supported A-1

database transactions, UniVerse ODBCsupport of A-14

databasessample E-1

DATATYPE field 4-16, 4-17DATE

in ALTER TABLE statement A-3in CREATE TABLE statement A-3

defining configurations 3-3, 4-3Delete button 3-16diagnosing connection problems 5-7diagnostic tool, ODBC 3-9, 3-25dirty data 4-19Dr. DeeBee Spy 3-25, 5-7

log file 3-26, 3-27monitoring configurations 3-25

DRDEEBEE.LOG file 3-26, 3-27DROP INDEX statement A-2

E

Edit menu 3-16Copy menu option 3-16Cut menu option 3-16Paste menu option 3-16

Page 167: UniVerse ODBC Guide

Index-3

Undo menu option 3-16editing

configurations 3-17UniVerse ODBC Config 3-17

empty strings 4-18empty-null mapping 4-18Encrypt passwords menu option 3-17encrypting passwords 3-17environment files 5-5environment variables 4-22, C-1

CONFIGDIR 3-24, 3-25, 5-4hs_environ file C-1HS_NAME_MAPPING 4-21, C-2,

C-3HS_RETRY_AS_UV_SQL A-13,

C-2, C-3HS_USE_FILEINFO 3-11, C-2, C-3HYPERDIR C-3LINKPORT C-3PATH 5-5SERVER C-2, C-3TMPDIR C-2, D-2UVFPDELAY 5-7, C-2, C-3Windows NT Registry C-1

error messages B-1errors, data conversion 4-18ESCAPE clause A-4executing UniVerse SQL A-12Exit menu option 3-16extended grammar

date types A-3ESCAPE clause in LIKE

predicate A-4ODBC SQL A-2outer joins A-3scalar functions A-4time types A-3UNION operator A-3

extensions, SQL A-13

F

fieldsmaking accessible 4-2, 4-11multivalued 4-3, 4-11Parameters 3-8Password 3-19Program 3-8System Name 3-18System Type 3-18unassociated multivalued 4-19User Name 3-18UV/ODBC Configuration

Name 3-18file access utility 4-5, 4-7–4-8file information cache 2-8, 4-7File menu 3-16

Exit menu option 3-16Open menu option 3-16Save menu option 3-16

files&SELECTLISTS& 4-10charmap.hss F-2CONFIG.HSC 3-3, 5-5CONFIG.MST 3-23configuration 1-3DRDEEBEE.LOG 3-26, 3-27environment 5-5hosts 5-6HS.INSTALL.LOG 5-8hs_environ C-1HS_FILE_ACCESS 2-8, 4-2, 4-5,

4-6, 4-7, 5-9making accessible 4-2, 4-5–4-11permissions and privileges 4-6remote 4-4server log 5-5server process log D-3setting permissions on 3-25UCI configuration 2-3unirpcservices 2-5UniVerse, see UniVerse files

Page 168: UniVerse ODBC Guide

Index-4 UniVerse ODBC Guide

UV.ACCOUNT 2-8uvodbc.h 3-8UVODBC.INI 3-24, 3-25

first normal form 4-3, 4-12FORMAT field 4-17functions, scalar A-4

G

generic ODBC applications, interoper-ability with UniVerseprocedures A-12

grammarcore ODBC SQL A-2extended ODBC SQL A-2

H

Help menu 3-17About UniVerse ODBC Config

menu option 3-17Help Topics menu option 3-17

Help Topics menu option 3-17host

setting passwords 3-19setting system names 3-18setting system types 3-18setting user names 3-18

hosts file 5-6HS.INSTALL.LOG file 5-8HS.ODBC.LISTS record 4-10HS.SALES account E-2

CUSTOMER table E-3PRODUCTS table E-6STATES table E-7

HS.SCRUB command 4-14, 4-15HS.SCRUB program 2-8HS.SERVICE account E-2

CALLS table E-8PROBLEMS table E-9PRODS table E-10

HS.SHOW.CONFIG program 2-7

HS.UPDATE.FILEINFOcommand 4-2, 4-6

HS.UPDATE.FILEINFO program 2-8HS_DEFAULT record 4-7hs_environ file C-1, D-2HS_FILE_ACCESS file 2-8, 4-2, 4-5,

4-6, 4-7, 5-9HS_NAME_MAPPING environment

variable 4-21, C-2, C-3HS_RETRY_AS_UV_SQL environ-

ment variable A-13, C-2, C-3HS_USE_FILEINFO environment

variable 3-11, C-2, C-3HYPERDIR environment variable C-3

I

initialization file, UVODBC.INI 3-24,3-25

initialization variables, see environ-ment variables

INSERT statements 4-20installing

client 3-1UniVerse ODBC Config 3-2

integrity modes A-14interaction, client/server 1-4isolating problems 5-1

K

keysassociation 4-19–4-20primary 4-19stable 4-19unstable 4-19

L

left outer joins A-3

Page 169: UniVerse ODBC Guide

Index-5

lengthof character columns 4-17of data 4-3

LIKE keyword A-4LIKE USER keyword A-2limitations

catalog information A-11default values with procedure

parameters A-11functional A-8qualifiers A-11return values A-11of UniVerse procedures A-11

LINKPORT environment variable C-3log files 5-5

description D-1examining D-1locating D-3

login scripts 2-2

M

manual mode A-14mapping

characters F-1empty-null 4-18name 4-20–4-22

MAXFETCHBUFF parameter 2-4, 4-17MAXFETCHCOLS parameter 2-4,

4-17menus

Edit 3-16File 3-16Help 3-17Options 3-17Test 3-16View 3-16

merging database entries 3-23monitoring

configurationsDr. DeeBee Spy 3-25

server processes D-1

multivaluedcolumns 4-11data 4-3fields 4-11fields, unassociated 4-19

N

name mapping 4-20–4-22names

mapping 4-20–4-22unqualified table 4-5

National Language Support, see NLSnative SQL syntax 4-7, 4-22, A-12NLS (National Language

Support) 3-11locale 3-12map name 3-11

null value 4-18

O

ODBCconformance 1-4

API 1-5creating data sources 3-5diagnostic tool 3-9, 3-25table types A-15

ODBC applications, generic A-12ODBC clients

left outer joins A-3limitations A-8

ODBC Data Source Administratorwindow 3-4, 3-13

ODBC Data Source Setup dialogbox 3-4

ODBC file access utility 4-5, 4-7–4-8ODBC name mapping 4-20–4-22ODBC qualifiers 4-4–4-5OK button 3-21Open menu option 3-16

Page 170: UniVerse ODBC Guide

Index-6 UniVerse ODBC Guide

Options menu 3-17Encrypt passwords menu

option 3-17outer joins A-3overview

of configuration files 1-2of UniVerse ODBC client 1-2of UniVerse ODBC Config 1-3of UniVerse ODBC drivers 1-2of UniVerse ODBC server 1-2

P

Parameters field 3-8parameters, procedures A-10Password field 3-19passwords

encrypting 3-17setting 3-19

Paste menu option 3-16PATH environment variable 5-5permissions 4-6Ping button 3-21Ping test, running 3-21Ping utility 5-6precision 4-17primary keys 4-19privileges 4-6problems

isolating 5-1reporting 5-2

proceduresbehavior of SQLRowCount

function A-10interoperability with generic ODBC

applications A-12limitations A-11

catalog information A-11default values with procedure

parameters A-11qualifiers A-11return values A-11

SQLProcedureColumnsfunction A-11

SQLProcedures function A-11parameters A-10result sets A-10syntax A-9UniVerse A-9

Program field 3-8

Q

Q-pointers 4-4qualified index names in CREATE

INDEX statement A-2qualifiers 4-4–4-5

table name A-2

R

record IDs 4-19, 4-20registry, see Windows NT: Registryremote execution service 1-4remote files 4-4removing UniVerse ODBC client 3-13RESTRICT qualifier A-2result sets A-10

SQLColAttributes function A-10SQLDescribeCol function A-10SQLNumResultCols function A-10SQLPrepare function A-10

retrying as UniVerse SQL A-13running UniVerse ODBC Config

Ping test 3-21saving configuration file

changes 3-22saving test results 3-23server test 3-21

S

sample accounts E-1Save menu option 3-16

Page 171: UniVerse ODBC Guide

Index-7

saving test results 3-22scalar functions A-4schemas, making accessible 4-1, 4-2,

4-3–4-5scripts

login 2-2server startup 2-2shell configuration 2-2startup 2-2UNIVERSE.TCP server startup 2-2

select lists, associating 4-10server

adding additional 3-14configuration entry

editing 3-17testing 3-17

integrity modes A-14log file 5-5monitoring D-1overview 1-2process log file D-3setting passwords 3-19setting system names 3-18setting system types 3-18software

checking version number 5-2startup scripts 2-2testing access to 3-21transaction support A-14

SERVER environment variable C-2,C-3

services, remote execution 1-4Setup button 3-15shell configuration 2-2

scripts 2-2SICA 4-11, 4-17SM field 4-12SQL

core ODBC grammar A-2extended ODBC grammar A-2native syntax 4-7, 4-22native syntax extension A-12

processor A-12syntax A-12

extensions A-13native A-12retrying as UniVerse SQL A-13

UniVerse SQL A-12SQL data types, supported A-1, A-2SQL_CURRENT_QUALIFIER

option 4-4SQLColAttributes function A-10, A-12SQLDescribeCol function A-10, A-12SQLDriverConnect function 3-8SQLError function 3-25SQLExecute function 3-26, A-12SQLGetInfo function 3-27SQLNumResultCols function A-10,

A-12SQLPrepare function 3-26, A-10, A-12SQLProcedureColumns function A-11SQLProcedures function A-11SQLRowCount function A-10SQLSetConnectOption function 3-8,

4-4SQLSetStmtOption function 3-8SQLTables function 4-12SQLTrace function 3-27SQLTYPE field 4-16, 4-17stable association keys 4-19STAR/Config 4-3startup scripts 2-2status bar 3-15syntax

native SQL 4-7procedure calls A-9

systemchecking resources 2-1obtaining information 5-2

System Administration menuaccessing 2-7options 2-7

system configuration, clients 3-1System Name field 3-18

Page 172: UniVerse ODBC Guide

Index-8 UniVerse ODBC Guide

system names 3-18System Type field 3-18system types 3-18

T

table names, unqualified 4-5table types A-15tables

making accessible 4-2, 4-5–4-11unqualified names 4-5

TCP/IP, verifying a connection 5-6telnet 5-6Test All Configurations menu

option 3-16Test button 3-16, 3-21Test menu 3-16

Test All Configurations menuoption 3-16

Test Selected Configuration menuoption 3-16

test results, saving 3-22Test Selected Configuration menu

option 3-16testing

configurations 3-16, 3-17, 3-21network connection (Ping) 3-21server access 3-21server configuration 3-17

TIMEin ALTER TABLE statement A-3in CREATE TABLE statement A-3

TMPDIR environment variable C-2,D-2

toolbar 3-15Toolbar menu option 3-16transaction support A-14transactions

DBMS A-14server support A-14UniVerse ODBC driver A-15

troubleshootingclient checklist 5-9client information 5-2isolating problems 5-1server information 5-2UniVerse ODBC server

checklist 5-8UNIX server checklist 5-8Windows NT server checklist 5-7

U

UCIconfiguration file 2-3configuring for UniVerse

ODBC 2-3unassociated multivalued fields 4-19Undo menu option 3-16UNION operator A-3UniRPC daemon 5-8UniRPC service 5-7unirpcservices file 2-5UniVerse 2-7

checking version 5-2procedures A-9troubleshooting checklist 5-8UniRPC daemon 5-8UniRPC service 5-7

UniVerse ODBCconfiguring UCI for 2-3on UNIX 3-1

UniVerse ODBC client software,removing 3-13

UniVerse ODBC client, overview 1-2UniVerse ODBC Config 4-3

configuration manager 1-3editing 3-17installing 3-2overview 1-3running Ping test 3-21running server test 3-21Test menu 3-16

Page 173: UniVerse ODBC Guide

Index-9

UniVerse ODBC Config windowAdd button 3-16Delete button 3-16Edit menu 3-16File menu 3-16Help menu 3-17menus 3-16Options menu 3-17Setup button 3-15status bar 3-15Test button 3-16Test menu 3-16toolbar 3-15using 3-14UV/ODBC Configurations list

box 3-15View menu 3-16

UniVerse ODBC Configuration Editordialog box 3-17

UniVerse ODBC configuration filesdistributing to users 3-12merging 3-23

UniVerse ODBC drivers 1-1overview 1-2transactions A-15

UniVerse ODBC serverchecking version 5-2overview 1-2upgrading 4-8

UniVerse SQLexecuting A-12native syntax extension A-12

UNIVERSE.TCP server startupscript 2-2

UNIXchecking system resources 2-1checking version 5-2login scripts 2-2shell configuration scripts 2-2startup scripts 2-2system preparation 2-1troubleshooting checklist 5-8

unqualified names in DROP INDEXstatement A-2

unqualified table names 4-5unstable association keys 4-19UPDATE statements 4-20updates, transaction support A-14upgrading UniVerse ODBC server

software 4-8User Name field 3-18using UniVerse ODBC Config

window 3-14UV.ACCOUNT file 2-8UV/ODBC Configuration Name

field 3-18UV/ODBC Configurations list

box 3-15UVFPDELAY environment

variable 5-7, C-2, C-3uvodbc.h file 3-8UVODBC.INI initialization file 3-24,

3-25

V

verifying client configuration 3-1version numbers, checking 5-2View menu 3-16

Toolbar menu option 3-16views, making accessible 4-2, 4-5–4-11virtual fields 5-8

W

windowsODBC Data Source

Administrator 3-4, 3-13UniVerse ODBC Config 3-14

Windows NTchecking version 5-2Registry C-1troubleshooting checklist 5-7

Page 174: UniVerse ODBC Guide

Index-10 UniVerse ODBC Guide

Page 175: UniVerse ODBC Guide

To help us provide you with the best documentation possible, please make yourcomments and suggestions concerning this manual on this form and fax it to us at508-366-3669, attention Technical Publications Manager. All comments andsuggestions become the property of Ardent Software, Inc. We greatly appreciateyour comments.

Comments

Name:________________________________________ Date:_________________

Position: ______________________________________ Dept:_________________

Organization: _________________________________ Phone:________________

Address:____________________________________________________________

____________________________________________________________________

Name of Manual: UniVerse ODBC Guide

Part Number: 70-9038-952

Page 176: UniVerse ODBC Guide