DB2 Version 9.7 for Linux, UNIX, and Windows

LongDataCompat CLI/ODBC configuration keyword

Reports LOBs as long data types or as large object types.

db2cli.ini keyword syntax:
LongDataCompat = 0 | 1 | 2
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.
  • 2 = Report LOBs as long data types for JDBC applications only. This does not affect applications using the DB2® Universal JDBC Driver.
Table 1. Corresponding large object and long data types for LOB data
Database data type Large objects (0 - Default) Long data types (1 - CLI/ODBC; 2 - JDBC)
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.