Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to set null to date column in DB2

843854Aug 15 2003 — edited Sep 8 2003
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2003
Added on Aug 15 2003
2 comments
803 views