Closed matthew-wozniczka closed 7 years ago
Yes; the intention was that the closing the child cursor continue the fetch operation on the parent (which, as you say, would also apply to SQLFreeStmt(SQL_CLOSE) -- however, (as you say) I don't think this buys us anything as the client already knows they have to call SQLNextColumn after processing the child.
Section 3.9.4.1 (Retrieving Dynamic Columns) has the sentence
When would
SQLCloseCursor
returnSQL_DATA_AVAILABLE
(What does it mean?). Does it only do this in the 'interrupted fetch' state, or whenever a nested statement handle is closed?Does
SQLFreeStmt(SQL_CLOSE)
work in the same way?If the intention is that it is returning that what calling
SQLNextColumn
on the parent statement handle will return, does this mean thatSQLCloseCursor
may also returnSQL_METADATA_CHANGED
orSQL_MORE_DATA
? Since the application is obligated to callSQLNextColumn
on the parent statement handle anyway to complete the interrupted fetch, I don't think this gives us anything, and only adds complexity.