db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Created: (DERBY-447) getBoolean() throws data conversion exception for DECIMAL type in J2ME/CDC/Foundation
Date Fri, 08 Jul 2005 16:35:46 GMT
Dag H. Wanvik wrote:
> Hi,
> 
> Out of curiosity I checked the DatabaseMetaData on the topic of
> conversion and I found that supportsConvert() returns true, but still
> returns false for all combination of types,
> e.g. supportsConvert(java.sql.Types.DECIMAL, java.sql.Types.BOOLEAN);
> viz. the code in the embedded driver:
> 
>     public boolean supportsConvert() {
> 	return true;
>     }
> 
>     public boolean supportsConvert(int fromType, int toType) {
>     /*
>      * at the moment we don't support CONVERT at all, so we take the easy
>      * way out.  Eventually we need to figure out how to handle this
>      * cleanly.
>      */
>      return false;
> 
> JDBC 3.0 section 14.2.3.1 "Data Type Conversions" says this method
> should return true if the driver supports the respective getter method
> on the result set.

There's some inconsistency here, the ResultSet getter methods are
converting from SQL data types to Java data types. This supportsConvert
method takes two arguments, both of which describe SQL data types.


Dan.


Mime
View raw message