DB2 CLI function summary

Tabulka 29 gives a summary of the DB2 CLI functions supported by DB2 Everyplace, including the purpose of each function and a summary of the differences between the DB2 CLI functions supported by DB2 Everyplace and the standard DB2 CLI functions.

Tabulka 29. DB2 CLI function list

Function name Purpose Summary of differences
SQLAllocConnect Obtains a connection handle.
SQLAllocEnv Obtains an environment handle.
SQLAllocHandle Obtains a handle.
SQLAllocStmt Allocates a statement handle.
SQLBindCol Assigns storage for a result column and specifies the data type. The target type is restricted to the supported data types. LOB locator is not supported.
SQLBindParameter Assigns storage for a parameter in an SQL statement. Does not support binding to arrays of application variables or LOB locators. Does not support SQLPutData(), so the application should put the value of the parameter in ParameterValuePtr before calling SQLExecute(). The parameter type is limited to only INPUT because stored procedures are not supported.
SQLColumns Returns the list of column names in specified tables. CatalogName, NameLength1, SchemaName, NameLength2 are ignored. Columns 2, 12, and 15 of the returned result set are always NULL. The return code SQL_STILL_EXECUTING is not supported.
SQLConnect Connects to a specific driver by data source name, user ID, and password.
SQLDescribeCol Describes a column in the result set. The column information is limited by the supported column data types.
SQLDisconnect Closes the connection.
SQLEndTran Requests a COMMIT or ROLLBACK for all operations on all statements associated with a connection. Connection attribute SQL_ATTR_AUTOCOMMIT must be set to SQL_AUTOCOMMIT_OFF before calling SQLEndTran().
SQLError Returns additional error or status information.
SQLExecDirect Executes a statement. The return codes, SQL_STILL_EXECUTING and SQL_NEED_DATA, are not supported. Asynchronous CLI calls are not supported.
SQLExecute Executes a prepared statement. All parameters must be bound before calling SQLExecute(). Asynchronous execution of SQL calls is not supported.
SQLFetch Returns a result row. The result is fetched one row at a time, not by row sets. Statement descriptors are not supported. The return code SQL_STILL_EXECUTING is not supported.
SQLFetchScroll Returns a result row set. The result is fetched by row sets. The return code SQL_STILL_EXECUTING is not supported.
SQLForeignKeys Returns information about foreign keys for the specified table. PKCatalogName, NameLength1, PKSchemaName, NameLength2, FKCatalogName, NameLength4, FKSchemaName, NameLength5 are ignored. Columns 1, 2, 5, 6, 12, and 13 of the returned result set are always a zero length string. Columns 10, 11, and 14 of the returned result set are always zero. The return code SQL_STILL_EXECUTING is not supported.
SQLFreeConnect Releases the connection handle.
SQLFreeEnv Releases the environment handle.
SQLFreeHandle Frees handle resources.
SQLFreeStmt Ends statement processing, discards pending results, and, optionally, frees all resources associated with the statement handle. Only the SQL_DROP and SQL_RESET_PARAMS options are supported.
SQLGetConnectAttr Returns the current setting of a connection attribute. DB2 Everyplace supports a subset of connection attributes supported by DB2. DB2 Everyplace also supports some connection attributes not supported by DB2.
SQLGetCursorName Returns the cursor name associated with a statement handle. The internally generated cursor name always begin with CUR.
SQLGetData Returns part or all of one column of one row of a result set. The target type is restricted to the supported data types. LOB locator is not supported. The return code SQL_STILL_EXECUTING is not supported.
SQLGetDiagRec Gets multiple fields of diagnostic data. Only diagnostic records associated with a statement handle or connection handle are supported. Only single diagnostic records are supported.
SQLGetInfo Returns information about a specific driver and data source. DB2 Everyplace supports a subset of the information types supported by DB2.
SQLGetStmtAttr Returns the current setting of a statement attribute. DB2 Everyplace supports a subset of statement attributes supported by DB2. DB2 Everyplace also supports some statement attributes not supported by DB2.
SQLNumParams Returns the number of parameter markers in an SQL statement. The return code SQL_STILL_EXECUTING is not supported.
SQLNumResultCols Returns the number of columns in the result set.
SQLPrepare Prepares an SQL statement for later execution.
SQLPrimaryKeys Returns a list of column names that comprise the primary key for a table. CatalogName, NameLength1, SchemaName, NameLength2 are ignored. Columns 1, 2, and 6 of the returned result set are always a zero length string. The return code SQL_STILL_EXECUTING is not supported.
SQLRowCount Returns the number of rows affected by an insert, update, or delete request.
SQLSetConnectAttr Sets options related to a connection. DB2 Everyplace supports a subset of connection attributes supported by DB2. DB2 Everyplace also supports some connection attributes not supported by DB2.
SQLSetStmtAttr Sets options related to a statement. DB2 Everyplace supports a subset of statement attributes supported by DB2. DB2 Everyplace also supports some statement attributes not supported by DB2.
SQLTables Returns the list of table names stored in a specific data source. CatalogName, NameLength1, SchemaName, NameLength2, TableType, NameLength4 are ignored. DB2 Everyplace only supports type "TABLE." The return code SQL_STILL_EXECUTING is not supported.

Související odkazy