================================= DOCUMENTATION NOTES FOR INFORMIX-CLI Programmer's Manual 2.5 DATE: 12 December 1996 ================================= Table of Contents I. Overview of CLIDOC_2.5 II. Installing INFORMIX-CLI on Windows NT III. Windows for Workgroups 3.11 IV. SQL Data Types V. Using GLS in UNIX VI. Using the INFORMIX-CLI Documentation VII. New INFORMIX-CLI Libraries VIII. Using the Sample ODBC Programs (UNIX only) A. The "demoodbc" Program B. The "adhoc" Program =============================== I. OVERVIEW OF CLIDOC_2.5 CLIDOC_2.5 describes feature and performance topics not covered in the manual or modified since publication. Please examine this file. It contains vital information about application and performance issues. =============================== II. Installing INFORMIX-CLI on Windows NT In order to install INFORMIX-CLI on Windows NT, you must have administrative privileges. Logon as administrator before performing the installation. III. Windows for Workgroups 3.11 Windows for Workgroups 3.11 supercedes Windows 3.1 and can support INFORMIX-CLI, Version 2.5. Information found in the documentation for "Windows 3.1" is also applicable to Windows 3.11. IV. SQL Data Types The SQL_FLOAT data type is equivalent to the SQL_DOUBLE data type, and the SQL_NUMERIC data type is equivalent to the SQL_DECIMAL data type. SQL_FLOAT and SQL_NUMERIC data types can substitute for their equivalent data types. V. Using GLS in UNIX If you want to use a different locale (for example, French), set the DB_LOCALE environment variable to a valid locale name. For more information on valid locales, refer to the "Informix GLS Guide to Functionality." If the data appears to be of a different locale from what you have set, check that IV_LOCALE, IV_GLS_REGISTRY, GL_PATH, and IV_GLS_LCDIR are not set. VI. Using the INFORMIX-CLI Documentation Please rely on the information presented in these documentation notes, the "INFORMIX-CLI Programmer's Manual" and the release notes. These sources contain more recent information than the on-line help in Windows environments. VII. New INFORMIX-CLI Libaries The names of the INFOMIX-CLI libraries have been updated. A current list appears in the release notes. VII. Using Sample ODBC Programs (UNIX only) INFORMIX-CLI for UNIX includes two demonstration programs for you to use. The files are called "demoodbc.c" and "adhoc.c". These programs, available on UNIX only, are located in the $INFORMIXDIR/demo and $INFORMIXDIR/demo2 directories, respectively. The demo programs are distributed in compiled form for your operating system. A UNIX "make" file is also distributed in the "demo" or "demo2" directory for re-compilation purposes. A. The "demoodbc" Program The "demoodbc" program performs basic ODBC connection, query, and disconnection functionality. This program is useful for verifying that you have supplied all necessary environment and connection information prior to using a data source for actual database purposes. To use the "demoodbc" sample program: 1) Use the appropriate sample .sql" file that is provided in the $INFORMIXDIR/demo directory to create and populate a table named "emp" on your DBMS. For example, the appropriate ".sql" file for an Informix database is named "empinformix.sql". (The "demoodbc" program requires a table named "emp" to exist on your DBMS.) 2) Create a datasource entry in your ".odbc.ini" file to point to the appropriate database. 3) Execute the "demoodbc" program using the following syntax: demoodbc emptestdb -uid jacob -pwd koosh In the example above, "emptestdb" is a datasource name pointing to the database containing the sample "emp" table, "jacob" is a user id (or login), and "koosh" is the password for user "jacob". After you perform step 3 above, the "demoodbc" program attempts to connect to the requested data source, perform a query on the "emp" table, and disconnect from the requested data source. If connection or querying problems occur, the program returns an error message. A. The "adhoc" Program The "adhoc" program allows you to dynamically execute SQL statements for a given data source. This program lets you query and retrieve information from a database table. To use the "adhoc" sample program: 1) Create a datasource entry in your ".odbc.ini" file for the database you wish to query. 2) Execute the "adhoc" program to connect to the data source. You can execute the program via two methods. Method 1: Enter the following information on the command line: adhoc emptestdb jacob koosh In the example above, "emptestdb" is a datasource name pointing to the database containing the sample "emp" table, "jacob" is a user id (or login), and "koosh" is the password for user "jacob". Method 2: Enter the following information on the command line: adhoc When the return key is pressed, the "adhoc" program will interactively query you for the appropriate datasource name, user name, and password. Enter the appropriate information at each prompt. The program informs you when you have connected to the data source. 3) Type an SQL query (using the SQL syntax that is native to the target database server) at the command line. 4) Press the "return" key. The "adhoc" program executes the requested SQL statement. If the statement is a query, the target database and table will be queried for the desired information. If information exists, it will be returned and presented to the user. ===============================