db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1938) Add support for setObject(<arg>, null)
Date Tue, 10 Oct 2006 00:48:26 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1938?page=comments#action_12441025 ] 
Dag H. Wanvik commented on DERBY-1938:

I googled and found a discussion on this on the mailinglist
for the Jakarta taglibs project:


This thread (dated; 2004) seems to indicate that at least the jTDS driver for SQL server 
accepts this usage. 

Digging more, the next link says that the behavior is sanctioned an in deed checked 
by the J2EE CTS (the person claims to have consulted former spec lead Jonathan Bruce):


This is a link to mail by Lance, indicating the Oracle can also accept this in a 
"CTS compatibility mode":


The JDBC Tutorial books says "no", the 4.0 API says "OK, but not guaranteed portable".
The API is more authoritative than the book, according to Lance.

Given the above, and that the API is more authoritative than the book, I think it would 
perhaps be OK for Derby to support this in the interest of ease of portability of apps to

Not my itch, though :)

> 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
>         Attachments: DERBY-1938.patch
> 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


View raw message