How to set null to date column in DB2
843854Aug 15 2003 — edited Sep 8 2003I am trying to execute following SQL query on DB2 database with JDBC prepared statement.
update c1127dba.tppmsg set msg_txt =?, strt_dt = ?, end_dt =?, data_updt_usr_id = ?, data_updt_ts = ? where msg_id = ?
When I assign a proper value to each of the parameters, the query works. But at times, I need to null out the end_dt column. I set null by writing
preparedStatement.setNull(index, TYPES.NULL)
-- or --
preparedStatement.setObject(index, null)
On executing it I get this error:
[IBM][JDBC Driver] CLI0613E Program type out of range. SQLSTATE=S1003
Any suggestion to fix this issue is appreciated.