[ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12421145 ] Daniel John Debrunner commented on DERBY-1501: ----------------------------------------------
Lance Andersen wrote on the derv-dev list: ---- I am not sure why the wording was added to the overloaded setNull method which was added in JDBC 3. i probably would expect it to not ignore the specified sql type in order to make sure the action requested is valid. I would have to check the SQL standard and discuss this with the EG further but it is something else to try and clean up and added it to my ever growing to do list ---- So let's check this out before we change the existing behaviour. Remember the javadoc that Knut Anders quoted from is from some *draft* of the JDBC 4 spec. > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY in embedded mode > ---------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1501 > URL: http://issues.apache.org/jira/browse/DERBY-1501 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.1.1.0 > Environment: WindowsXP > Reporter: Markus Fuchs > Attachments: ByteArrayTest.java > > > When inserting a row into following table > BYTEARRAY_TEST( ID int, BYTEARRAY_VAL blob) > PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL > Exception if given sqlType is LONGVARBINARY. You must give sqlType BLOB to > make the insert work. The same test works using sqlType LONGVARBINARY in > network mode. The following combinations don't work: > Column type sqlType not working mandatory sqlType > BLOB LONGVARBINARY BLOB > CLOB LONGVARCHAR CLOB > The issue here is that first Derby behaves differently in network and > embedded mode. And secondly, should accept LONGVARBINARY/LONGVARCHAR for > BLOB/CLOB columns. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
