Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
3.0.1
-
None
-
None
-
Ubuntu 16.04, but not specific to Ubuntu
Description
In SQLGetData() in odbc_3_api.c, there is a check for if (TargetValuePtr == NULL) and if it is NULL, it returns HY009. However, it is common practice when fetching data from TEXT field to not know what buffer size is needed, and therefore simply pass NULL for TargetValuePtr and 0 for BufferLength to get the buffer size needed returned via StrLen_or_IndPtr then call SQLGetData() again with a sufficient buffer.
Simply commenting out this sanity check appears to work as expected.