Hello,

RC4 and DB2
The parameters in prepared statements are replaced incorrectly. Integers,
long etc. are all surrounded by quotes!
I modified PlatformDb2Impl.setObjectForStatement(...) to send the correct
set-method to the prepared statement for these types. Now that works fine
(did anyone uses OJB for DB2 before?).

The weird thing: in the where condition of update statements, the values
still were not correctly set (quotes for integers).
I had a look into StatementManager.bindUpdate and replaced there the line
        stmt.setObject(index, values[i], SqlHelper.getSqlTypePk(cld, i));
with
        m_platform.setObjectForStatement(stmt, index, values[i],
SqlHelper.getSqlTypePk(cld, i));

Now this seems to work too. Is the patch correct (please confirm/refuse) or
were there good reasons for using stmt.setObject(...)? (This is not DB2
specific, how comes no-one else reports problems??)

Thanks,
Norbert.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to