SQLBindFileToParam() CLI 函数中的最后一个参数 IndicatorValue 当前被描述为“output (deferred)”。它应为“input (deferred)”。
|SQL_DESC_AUTO_UNIQUE_VALUE 和 SQL_DESC_UPDATABLE 自变量的“Description”列增加了下列更新: |
|以下文本替换 SQLGetData 的 SQLSTATE 表中的 SQLSTATE 22007 的 Explanation 列中的当前语句:
|Conversion from a string to a datetime format was indicated, but an invalid |string representation or value was specified, or the value was an invalid |date.
|下列内容更正了“Information Returned by SQLGetInfo”下面的“Usage”一节中的信息: |
|下列内容更正了“Table 113. SQLGetLength Arguments”中的脚注:
|Note: a This is in characters for DBCLOB data.
应将以下文本添加至第 5 章“DB2 CLI Functions”:
Specification: DB2 CLI 7.x
SQLRETURN SQLNextResult (SQLHSTMT StatementHandle1 SQLHSTMT StatementHandle2);
Data Type | Argument | Use | Description |
---|---|---|---|
SQLHSTMT | StatementHandle | input | Statement handle. |
SQLHSTMT | StatementHandle | input | Statement handle. |
A stored procedure returns multiple result sets by leaving one or more cursors open after exiting. The first result set is always accessed by using the statement handle that called the stored procedure. If multiple result sets are returned, either SQLMoreResults() or SQLNextResult() can be used to describe and fetch the result set.
SQLMoreResults() is used to close the cursor for the first result set and allow the next result set to be processed, whereas SQLNextResult() moves the next result set to StatementHandle2, without closing the cursor on StatementHandle1. Both functions return SQL_NO_DATA_FOUND if there are no result sets to be fetched.
Using SQLNextResult() allows result sets to be processed in any order once they have been transferred to other statement handles. Mixed calls to SQLMoreResults() and SQLNextResult() are allowed until there are no more cursors (open result sets) on StatementHandle1.
When SQLNextResult() returns SQL_SUCCESS, the next result set is no longer associated with StatementHandle1. Instead, the next result set is associated with StatementHandle2, as if a call to SQLExecDirect() had just successfully executed a query on StatementHandle2. The cursor, therefore, can be described using SQLNumResultSets(), SQLDescribeCol(), or SQLColAttribute().
After SQLNextResult() has been called, the result set now associated with StatementHandle2 is removed from the chain of remaining result sets and cannot be used again in either SQLNextResult() or SQLMoreResults(). This means that for 'n' result sets, SQLNextResult() can be called successfully at most 'n-1' times.
If SQLFreeStmt() is called with the SQL_CLOSE option, or SQLFreeHandle() is called with HandleType set to SQL_HANDLE_STMT, all pending result sets on this statement handle are discarded.
SQLNextResult() returns SQL_ERROR if StatementHandle2 has an open cursor or StatementHandle1 and StatementHandle2 are not on the same connection. If any errors or warnings are returned, SQLError() must always be called on StatementHandle1.
SQLSTATE | Description | Explanation |
---|---|---|
40003 08S01 | Communication Link failure. | The communication link between the application and data source failed before the function completed. |
58004 | Unexpected system failure. | Unrecoverable system error. |
HY001 | Memory allocation failure. | DB2 CLI is unable to allocate the memory required to support execution or completion of the function. |
HY010 | Function sequence error. |
The function was called while in a data-at-execute (SQLParamData(), SQLPutData()) operation. StatementHandle2 has an open cursor associated with it. The function was called while
within a BEGIN COMPOUND and END COMPOUND SQL operation.
|
HY013 | Unexpected memory handling error. | DB2 CLI was unable to access the memory required to support execution or completion of the function. |
HYT00 | Time-out expired. | The time-out period expired before the data source returned the result set. Time-outs are only supported on non-multitasking systems such as Windows 3.1 and Macintosh System 7. The time-out period can be set using the SQL_ATTR_QUERY_TIMEOUT attribute for SQLSetConnectAttr(). |
Only SQLMoreResults() can be used for parameterized queries.
|以下是“Usage”的“Environment Attributes”一节中的附加环境属性: |
|
|下列内容将替换语句属性 SQL_ATTR_QUERY_TIMEOUT 的现有信息: |