[
http://issues.apache.org/jira/browse/DERBY-1938?page=comments#action_12440800 ]
Tomohito Nakayama commented on DERBY-1938:
------------------------------------------
I found next comment in the code.
org.apache.derby.impl.jdbc.EmbedPreparedStatement :
public final void setObject(int parameterIndex, Object x) throws
SQLException {
checkStatus();
int colType = getParameterJDBCType(parameterIndex);
// JDBC Tutorial and Reference books states in the
PreparedStatement
// overview, that passing a untyped null into setObject() is
not allowed.
// JCC disallows this, basically SQL can not handle a untyped
NULL.
// Section 25.1.6 (Third edition), 24.1.5 (Second Edition)
if (x == null) {
//setNull(parameterIndex, colType);
//return;
throw dataTypeConversion(parameterIndex, "null");
}
> Add support for setObject(<arg>, null)
> --------------------------------------
>
> Key: DERBY-1938
> URL: http://issues.apache.org/jira/browse/DERBY-1938
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Reporter: Dag H. Wanvik
> Assigned To: Tomohito Nakayama
> Priority: Minor
>
> Derby presently does not implement support for the method
> PreparedStatement.setObject (and similarly for CallableStatement.setObject)
> when the supplied value is null, unless a type argument (3rd arg) is also
> present.
> That is, in:
> void setObject(int parameterIndex,
> Object x)
> throws SQLException
> x can not be null.
> Derby will presently throw an SQLException (client: XJ021, embedded: 22005)
> if x is null when calling this method on a preparedStatement.
> Porting some applications may be made easier if this restriction is lifted.
> See also discussion in DERBY-1904.
--
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