Databases Reference
In-Depth Information
After the processing of an SQL statement is complete, the statement handle can
be freed. In the complete CLI code definition in Example 4-34 on page 188, we
show how to prepare, bind, and execute a SELECT statement and fetch the
results. Table 4-9 lists some CLI APIs that you can use for processing an SQL
statement.
Table 4-9 Some CLI APIs for SQL processing
CLI API
Purpose
SQLPrepare
Prepare an SQL statement.
SQLExtendedPrepare
Prepare an array of statement attributes for an SQL
statement.
SQLExtendedBind
Bind an array of columns.
SQLBindParameter
SQLSetParam
Bind a parameter marker in an SQL statement.
SQLDescribeParam
Get info about a parameter marker.
SQLExecute
Execute a prepared statement.
SQLExecDirect
Execute a statement.
SQLNumParams
Get the number of parameters in a statement.
SQLRowCount
Get the number of rows affected by an insert/update/delete
or number of rows in a result set.
SQLNumResultCols
Get the number of columns in a result set.
SQLDescribeCol
Describe a column in the result set.
SQLColAttribute
SQLColAttributes
Get information about the attributes of a column in a result
set.
SQLBindCol
Bind a column in the result set to an application variable.
SQLFetch
Get a result set row.
SQLExtendedFetch
Get multiple result set rows.
SQLCancel
Cancel an SQL statement.
SQLTransact
SQLCloseCursor
Commit or roll back a transaction.
SQLEndTran
End a transaction.
 
Search WWH ::




Custom Search