Summary: | sql:update invalid column type when inserting null | ||
---|---|---|---|
Product: | Taglibs | Reporter: | Dieter van Baarle <dvbaar> |
Component: | Standard Taglib | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Dieter van Baarle
2002-10-08 13:00:33 UTC
I have checked with a few JDBC folks at Oracle and although I have not received an official answer as to whether or not the way it is coded in JSTL should work with our JDBC driver, it was suggest that rather than using ps.setNull(i+1, java.sql.Type.NULL), the code should use ps.setString(i+1, null); I have logged Oracle bug 2619578 for clarification/or action. This is a bug in the implementation. In order for setNull to be used properly it would need to have the right column type. According to JDBC 3.0 section 13.2.2.3, a null can be passed to the PreparedStatement.setObject() and the parameter will be set to JDBC NULL properly so the PreparedStatment.setNull() call can be removed. It is Oracle's position that the current useage in the JSTL is not correct. In stead, you should use ps.setObject(i+1, null); |