JDBC PreparedStatement.setString problem
479996Jan 2 2006 — edited Jan 5 2006DB version: 10g Release 2
OS version: Windows XP Release 2
JVM version: 1.5.0_06
Using the JDBC thin driver's PreparedStatement.setString(columnNumber, "") into a VARCHAR2(128) NOT NULL column followed by an executeUpdate(), generates
"java.sql.SQLException: ORA-01400: cannot insert NULL into"...
It appears that the JDBC (thin) driver does not recognize a zero length string as not being a null value. Setting VARCHAR to an empty value works in MySQL and databases, but not in Oracle 10g... What's trick for doing this with Oracle's JDBC driver?