You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
column.getData(...) calls CLI function SQLGetData to fetch data for a column. It initially uses a 1024 bytes buffer to store the data. If 1024 bytes is not enough, then it allocates a new buffer and fetches again. But for data greater than 1024 bytes, column.getData(...) is truncating the value.
The text was updated successfully, but these errors were encountered:
column.getData needs to set c.len to the "total" buffer size. Otherwise,
we will return truncated data.
SQLGetData sets c.len to the number of bytes that are copied
to the output buffer. That's correct if the output buffer is big enough
and the output data isn't truncated. If the data is truncated, we call
SQLGetData in a loop until we get all the data. Each call to SQLGetData
sets c.len to the number of bytes fetched. In the end, c.len is not the
total number of bytes fetched. Instead, it is the amount of bytes
fetched during the last call to SQLGetData. When we return the data to the
application, we only return up to c.len. Since c.len is not the total
size, the returned data is truncated. Fix it by setting c.len to the
total number of bytes fetched before returning from column.getData(...).
column.getData(...) calls CLI function SQLGetData to fetch data for a column. It initially uses a 1024 bytes buffer to store the data. If 1024 bytes is not enough, then it allocates a new buffer and fetches again. But for data greater than 1024 bytes, column.getData(...) is truncating the value.
The text was updated successfully, but these errors were encountered: