microsoft / ODBC-Specification

Microsoft ODBC Specification
Other
122 stars 40 forks source link

SQLGetNestedHandle in prepared state? #80

Closed matthew-wozniczka closed 7 years ago

matthew-wozniczka commented 7 years ago

Section 6.2 (SQLGetNestedHandle) says:

SQLGetNestedHandle can be called for columns containing nested collections or structured columns once the ParentStatementHandle is in a prepared or executed state.

I think we need some description of how that works (right now it only describes how it works in the executed state).

I assume it just means that all child statements are also prepared, and you can describe/bind (non-dynamic) columns in the nested statements before executing the query.

mikepizzo commented 7 years ago

Right.

mikepizzo commented 7 years ago

Updated description in 6.2: SQLGetNestedHandle can be called for columns containing nested collections or structured columns once the ParentStatementHandle is in a prepared or executed state. The nested handle can be used to fetch data once the ParentStatementHandle is in the executed state and the driver returns SQL_DATA_AVAILABLE for the particular column, and may allow fetching data at other times depending upon SQL_GETDATA_EXTENSIONS.

Additional information in section 6.2.1, Usage: Nested statement handles are in the prepared state and can be used to describe results once the parent statement handle is in the prepared or executed state. Applications can fetch data from the nested statement handle once SQLNextColumn returns the ordinal associated with the nested statement.