LongDataCompat CLI/ODBC and IBM data server driver configuration keyword
Reports LOBs as long data types or as large object types.
- db2cli.ini keyword syntax:
- LongDataCompat = 0 | 1
- IBM® data server driver configuration file (db2dsdriver.cfg) syntax:
- <parameter name="LongDataCompat" value="0 | 1"/>
Attention: The IBM data server
driver configuration
file (db2dsdriver.cfg) syntax is available in Db2 11.5.4 and later.
- Default setting:
- Reference LOB data types as large object types.
- Equivalent connection attribute:
- SQL_ATTR_LONGDATA_COMPAT
- Usage notes:
This option indicates to CLI what data type the application expects when working with a database with large object (LOB) columns.
The values for this option are:
- 0 = Reference LOB data types as large object types.
- 1 = Report LOBs as long data types for CLI/ODBC applications only.
Database data type | Large objects (0 - Default) | Long data types (1 - CLI/ODBC) |
---|---|---|
CLOB | SQL_CLOB | SQL_LONGVARCHAR |
BLOB | SQL_BLOB | SQL_LONGVARBINARY |
DBCLOB | SQL_DBCLOB | SQL_LONGVARGRAPHIC* |
* If the MapGraphicDescribe keyword is set in conjunction with LongDataCompat, DBCLOB columns will return an SQL type of SQL_LONGVARCHAR if MapGraphicDescribe is 1 and SQL_WLONGVARCHAR if MapGraphicDescribe is 2. |
This option is useful when running ODBC applications that cannot handle the large object data types.
The CLI/ODBC option LOBMaxColumnSize can be used in conjunction with this option to reduce the default size declared for the data.