LOB Function Overview
LOB Function Overview#
The functions that are available for manipulating LOB data are as follows:
-
SQLBindFileToCol() (Non-standard)
Full Retrieve -
SQLBindFileToParam() (Non-standard)
Full Insert, Full Update -
SQLGetLobLength() (Non-standard)
Get the length of LOB data. -
SQLGetLob() (Non-standard)
Partial Retrieve -
SQLPutLob() (Non-standard)
Partial Insert, Partial Update, Partial Delete -
SQLFreeLob() (Non-standard)
Release the LOB locator being used. -
SQLGetData(), SQLPutData() (Non-standard)
Full Retrieve/Update -
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
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.