db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1501) PreparedStatement#setNull(int parameterIndex, int sqlType) throws SQL Exception if given sqlType is LONGVARBINARY in embedded mode
Date Tue, 11 Jul 2006 22:26:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1501?page=comments#action_12420458 ] 

Kristian Waagan commented on DERBY-1501:
----------------------------------------

The inconsistent behavior between the client and embedded driver is a bug.

But what about the second issue?
The embedded driver determines if the type of the parameter is "compatible" with the specified
SQL type. Currently, BLOB is not seen to be compatible with BINARY, VARBINARY or LONGVARBINARY.
The same goes for CLOB and the character types.
I think the embedded driver might be doing the right thing. I have no problem understanding
the logic in DataTypeDescriptor when I look at table B-5 in the JDBC 4 spec, but the table
is for setObject. Can anyone weigh in on this?

> 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
>         Type: Bug

>     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


Mime
View raw message