microsoft / ODBC-Specification

Microsoft ODBC Specification
Other
122 stars 40 forks source link

Calling SQLFetch/SQLFetchScroll after a previous call returns SQL_DATA_AVAILABLE #62

Closed matthew-wozniczka closed 7 years ago

matthew-wozniczka commented 7 years ago

Section 3.6 (Getting Data during Fetch) states:

Calling SQLFetch/SQLFetchScroll after SQLFetch, SQLFetchScroll, or SQLNextColumn returns SQL_DATA_AVAILABLE skips the remaining columns and begins fetching the next row.

This raises a few questions:

matthew-wozniczka commented 7 years ago

Also, what is the difference (if any) in this scenario between calling SQLNextColumn(NULL) vs SQLFetch/SQLFetchScroll?

mikepizzo commented 7 years ago

SQLFetch should always advance to the next row(set).

We can require calling SQLNextColumn(Null) prior to calling SQLFetch if it is in a DATA_AVAILABLE state.

mikepizzo commented 7 years ago

Updated spec: "Calling SQLFetch or SQLFetchScroll in a data-available state results in a function sequence error."