Inserting null values in DB2
843859Apr 3 2006 — edited Apr 3 2006Hi
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.