StarSQL v5 added support for DB2 LOB (large object) data types. The LongStrParams setting provides backwards compatibility to use StarSQL with hosts that do not support LOBs and applications that rely on the previous ODBC data types.
As shown in the following table, StarSQL no longer differentiates DB2 long strings from short strings.
DB2 Data Type |
StarSQL v4.1 ODBC Type |
StarSQL v5 ODBC Type |
VARCHAR |
SQL_VARCHAR |
SQL_VARCHAR |
LONG VARCHAR |
SQL_LONGVARCHAR |
SQL_VARCHAR |
VARGRAPHIC |
SQL_VARCHAR |
SQL_VARCHAR |
LONG VARGRAPHIC |
SQL_LONGVARCHAR |
SQL_VARCHAR |
VARCHAR FOR BIT DATA |
SQL_VARBINARY |
SQL_VARBINARY |
LONG VARCHAR FOR BIT DATA |
SQL_LONGVARBINARY |
SQL_VARBINARY |
The new data type mappings affect ODBC catalog query results. For example, SQLColumns for a DB2 LONG VARCHAR now returns ODBC type SQL_VARCHAR instead of SQL_LONGVARCHAR. The new mappings also affect parameters for SQL statements. If an application binds a parameter as SQL type SQL_LONGVARCHAR, it is sent as a DB2 CLOB instead of as a DB2 VARCHAR string.
When LongStrParams is set to Yes, then SQL_LONGVARCHAR is sent as VARCHAR instead of CLOB, and SQL_LONGVARBINARY is sent as VARCHAR FOR BIT DATA instead of BLOB. This LongStrParams setting does not affect the types returned for result set columns, or for types returned by catalog queries.
When StarSQL connects to an older version of DB2 that does not support LOB data types, the LongStrParams data source setting is forced to Yes and SQL_LONGVARCHAR and SQL_LONGVARBINARY parameters are sent as strings. Catalog queries, however, will not return SQL_LONGVARCHAR or SQL_LONGVARBINARY for long string types.