I have tried this. Indeed, it did the work of directly putting parameters
into query rather than binding, but unfortunately it seems to have a
problem with comparing null values. I get SQL Exception
Internal Exception: java.sql.SQLException: [BEA][DB2 JDBC
Driver][DB2]OPERANDS OF ARITHMETIC OR COMPARISON OPERATION NOT
COMPARABLE
Error Code: -401
Experimenting with generated query (I copied generated query from console
and executed it in TOAD) showed that the problem is in comparing nulls for
date typed, in this part of generated where condition:
AND (t0.DUE_DATE >= NULL)) AND (t0.DUE_DATE <= NULL)
while in other places it generates appropriate CAST (NULL AS
VARCHAR(32672) )
when I remove these date comparisons from query, it works. Otherwise, when
executing from TOAD, I get error:
ERROR [42818] [IBM][DB2/NT] SQL0401N The data types of the operands for
the operation ">=" are not compatible. SQLSTATE=42818