Closed matthew-wozniczka closed 7 years ago
I believe this ended up being resolved as part of issue #98.
Applications that specify odbc version 4.0 or greater will need to make sure the buffers are initialized to some value other than SQL_DATA_AT_FETCH (typically, SQL_DATA_UNAVAILABLE).
Related to #98, the current implementation of
SQL_DATA_AT_FETCH
requires the driver to use the length indicator for input when fetching. This is a new requirement in ODBC 4.0, which will cause backwards compatibility issues.Consider that in the past, when fetching data, the length indicator was output-only. This means that the application was not required to initialize the memory it pointed to. This means that it could inadvertently contain the value
SQL_DATA_AT_FETCH
, and cause the fetch to be interrupted (where the application may not be prepared for such a thing). Of course, such an application is likely using an earlier ODBC version forSQL_ATTR_ODBC_VERSION
, but it could cause ('random') problems for applications which were upgraded.This brings up a more fundamental point: If the application does not wish to bind the column as
SQL_DATA_AT_FETCH
, what value should the length indicator buffer be initialized to?