DB2 UDB CLI functions

This topic provides a description of each CLI function.

See Categories of DB2 UDB CLIs for a categorical listing of the functions.

Each of the DB2® UDB CLI function descriptions is presented in a consistent format.

How the CLI functions are described

The following table shows the type of information that is described in each section of the function description.

Type Description
Purpose This section gives a brief overview of what the function does. It also indicates if any functions should be called before and after calling the function being described.
Syntax

This section contains the C language prototype for the i5/OS™ environment.

Arguments This section lists each function argument, along with its data type, a description and whether it is an input or output argument.

Each DB2 UDB CLI argument is either an input or output argument. With the exception of SQLGetInfo(), DB2 UDB CLI only modifies arguments that are indicated as output.

Some functions contain input or output arguments which are known as deferred or bound arguments. These arguments are pointers to buffers allocated by the application. These arguments are associated with (or bound to) either a parameter in an SQL statement, or a column in a result set. The data areas specified by the function are accessed by DB2 UDB CLI at a later time. It is important that these deferred data areas are still valid at the time DB2 UDB CLI accesses them.

Usage This section provides information about how to use the function, and any special considerations. Possible error conditions are not discussed here, but are listed in the diagnostics section instead.
Return codes

This section lists all the possible function return codes. When SQL_ERROR or SQL_SUCCESS_WITH_INFO is returned, error information can be obtained by calling SQLError().

Refer to Diagnostics in a DB2 UDB CLI application for more information about return codes.

Diagnostics

This section contains a table that lists the SQLSTATEs explicitly returned by DB2 UDB CLI (SQLSTATEs generated by the Database Management System (DBMS) might also be returned) and indicates the cause of the error. These values are obtained by calling SQLError() after the function returns SQL_ERROR or SQL_SUCCESS_WITH_INFO.

An * in the first column indicates that the SQLSTATE is returned only by DB2 UDB CLI, and is not returned by other ODBC drivers.

Refer to Diagnostics in a DB2 UDB CLI application for more information about diagnostics.

Restrictions This section indicates any differences or limitations between DB2 UDB CLI and ODBC that might affect an application.
Example This section is a code fragment demonstrating the use of the function. The complete source used for all code fragments is listed in Examples: DB2 UDB CLI applications.
References This section lists related DB2 UDB CLI functions.