db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1938) Add support for setObject(<arg>, null)
Date Fri, 06 Oct 2006 14:15:20 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1938?page=comments#action_12440464 ] 
            
Bernt M. Johnsen commented on DERBY-1938:
-----------------------------------------

NOTE: Tutorial, 3rd ed says (25.1.6 p. 653): "The method setObject, however, can take a null
value only if the JDBC type is specified".

Although the tutorial is not the spec, it's clearly the intention that the SQL NULL in JDBC
should behave like SQL NULL in the SQL spec, and that JDBC compliant applications should *not*
call setObject(n, null) and that drivers are not required to implement it to be JDBC compliant.

> 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
>            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

        

Mime
View raw message