db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-518) Data type mismatch error for boolean to DECIMAL conversion in J2ME
Date Thu, 25 Aug 2005 18:18:08 GMT
    [ http://issues.apache.org/jira/browse/DERBY-518?page=comments#action_12320023 ] 

Deepa Remesh commented on DERBY-518:

Thanks Kathey and Dan for your comments.

Kathey, I see the advantage in moving setValue(boolean) to BinaryDecimal and not making it
depend on BigInteger - It can be used with all CDC implementations.  I'll change this and
submit a new patch.

Dan, I will remove setValue(Object) from my patch. I had opened this JIRA issue only for boolean
type and I think I should not have overloaded this patch. However, one thing I am not clear
about is the data type conversions in JSR169. Is there a table or some section in JSR169 for
data type conversions?  As it is a subset of JDBC3.0, I have been referring to JDBC3.0 spec
and the subset API mentioned in JSR169. My understanding is that objects which are instances
of Number or its subclass(other than BigDecimal) can be converted to DECIMAL type in JSR169.
I will appreciate any pointers on this.

> Data type mismatch error for boolean to DECIMAL conversion in J2ME
> ------------------------------------------------------------------
>          Key: DERBY-518
>          URL: http://issues.apache.org/jira/browse/DERBY-518
>      Project: Derby
>         Type: Bug
>   Components: JDBC
>  Environment: J2ME/CDC/Foundation Profile
>     Reporter: Deepa Remesh
>     Assignee: Deepa Remesh
>     Priority: Minor
>      Fix For:,
>  Attachments: derby-518.diff, derby-518.status
> The test jdbcapi/resultset.java gives the following error when run in J2ME/CDC/FP :
> Testing nullif(?,DECIMAL(10,5)) with setBoolean
> ERROR XCL12: An attempt was made to put a data value of type 'boolean' into a data value
of type 'DECIMAL'.
> I found that setValue(boolean) is not implemented in BigIntegerDecimal, which is the
class used for DECIMAL in J2ME. This is implemented in SQLDecimal and a similar implementation
can be provided in BigIntegerDecimal.
> On looking at the setValue methods in these classes, I also found that setValue(Object)
is implemented in SQLDecimal but not in BigIntegerDecimal.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message