Closed matthew-wozniczka closed 7 years ago
Contract is that the buffer is populated once SQLNextColumn is called. Driver could populate sooner, but client should not expect it to be populated when SQLNextColumn is called.
Related to #101
Sorry; misread that this is the SQL_MORE_DATA state. At the time SQL_MORE_DATA is returned, the buffer should contain up to the first BufferLength number of characters, and str_len_or_ind_ptr should indicate the total amount of data available, if known. This is a hint to the application how much buffer to allocate in SqlGetData for the remaining data.
Clarified in section 3.8:
When the length of data exceeds the bound buffer for string or binary data, and the application has set SQL_ATTR_LENGTH_EXCEPTION_BEHAVIOR
to SQL_LE_REPORT
, the driver populates as much data as fits in the allocated buffer, sets str_len_or_ind_ptr
to indicate the total amount of data available, if known, or SQL_NO_TOTAL
if the driver does not know how much additional data is to be written, and returns SQL_MORE_DATA
.
In section 3.8 (Variable Length Columns) it states:
Is the buffer populated after
SQLFetch
/SQLFetchScroll
returns, or only afterSQLNextColumn
does? I would expect the former, but the text implies the latter (Only relevant since the application can determine which bindings were filled thanks to the newSQL_DATA_UNAVAILABLE
).