I am experiencing a problem with the DB2 Universal Driver and a JDBC type of LONGVARCHAR. I get an illegal conversion exception. This problem was not experienced with the COM.ibm.db2.jdbc.app.DB2Driver.

In order to get around this problem I changed org.apache.ojb.broker.platforms.PlatformDb2Impl.setObjectForStatement method, adding a check for a LONGVARCHAR type.

...

 else if (sqlType == Types.LONGVARCHAR) {

           ps.setString(index, (String)value);

      }

...

This solved the illegal conversion exception with the Universal driver. I have not checked this change against the old driver.

Regards

Avril

 

Reply via email to