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!

Inserting null values in DB2

843859Apr 3 2006 — edited Apr 3 2006
Hi

I'm currently working on a small admin program and I'm using JDBC connection to access the DB2 on the AS400.
A little info on the driver and JDBC:
Drivername: AS/400 Toolbox for Java JDBC Driver
Driver version: 5.0
JDBC version: 3
My problem is that I can't insert null values in the database. Whenever I try to do this I get a SQLException:
Data type mismatch.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:395)
at com.ibm.as400.access.SQLNumeric.set(SQLNumeric.java:143)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setValue(AS400JDBCPreparedStatement.java:2407)
at com.ibm.as400.access.AS400JDBCPreparedStatement.setString(AS400JDBCPreparedStatement.java:2173)

How can I fix this, because it isn't necessary that the user fills in all the field the first time.

Thx in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2006
Added on Apr 3 2006
3 comments
930 views