LobDataClientBufferLimit IBM data server driver configuration keyword

Causes SQLGetData() to fetch column data in pieces of specified size (in bytes) instead of fetching column data all at once.

Equivalent CLI keyword
GetDataLobNoTotal
Equivalent IBM® data server provider for .NET connection string keyword
N/A
IBM data server driver configuration file (db2dsdriver.cfg) syntax
<parameter name="LobDataClientBufferLimit" value="positive integer"/>
Default setting:
Usage notes:

The SQLGetData() function retrieves data for a single column in the current row of the result set. The first call to the SQLGetData() function performs following tasks:

  • Fetches all the data from the database server to the client, which requires allocating memory on the client for the data.
  • Applies a code page conversion to the data, if required.
  • Calculates the total length of the converted data.
  • Returns the length of the converted data to the client application.

When the data is large, allocating memory for the data on the client might fail. You can avoid this potential memory allocation problem, by using the LobDataClientBufferLimit keyword.

When you set the LobDataClientBufferLimit keyword, the SQLGetData() function does not fetch all the data for a column on the first call. Instead, the SQLGetData() function fetches enough data to fill the buffer on the client, as specified by the value of the LobDataClientBufferLimit keyword, and returns SQL_NO_TOTAL (-4) if there is more data to be fetched from the server. You can call the SQLGetData() function as many times as needed to fetch all the data. When all the data is fetched, the SQLGetData() function returns SQL_SUCCESS and the size of the last data chunk.