Skip to content

LOB Function Overview

LOB Function Overview#

The functions that are available for manipulating LOB data are as follows:

  1. SQLBindFileToCol() (Non-standard)
    Full Retrieve

  2. SQLBindFileToParam() (Non-standard)
    Full Insert, Full Update

  3. SQLGetLobLength() (Non-standard)
    Get the length of LOB data.

  4. SQLGetLob() (Non-standard)
    Partial Retrieve

  5. SQLPutLob() (Non-standard)
    Partial Insert, Partial Update, Partial Delete

  6. SQLFreeLob() (Non-standard)
    Release the LOB locator being used.

  7. SQLGetData(), SQLPutData() (Non-standard)
    Full Retrieve/Update

  8. Other ODBC standard functions

Among the above functions, the functions #1 through #6 are special functions that are provided by Altibase for LOB manipulation, and they are not ODBC standard functions.

ODBC standard functions such as #7 and #8 can be used to access LOB data whether the database column type is LOB or not. However, when only a standard function is used, the functions for partial update and partial retrieve are not available. If a user wants to do programming with ODBC Driver Manager, he should add the following entry to the odbc.ini file:

LongDataCompat = yes
or
LongDataCompat = on

If the above entry is added, the types such as SQL_BLOB and SQL_CLOB are converted to SQL_LONGVARBINARY and SQL_LONGVARCHAR types respectively before they are passed to the user. Therefore, if ODBC Driver Manager is used, transparent manipulation of LOB data can be ensured.