db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TomohitoNakayama <tomon...@basil.ocn.ne.jp>
Subject Re: [jira] Commented: (DERBY-1610) Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver
Date Tue, 05 Sep 2006 13:40:42 GMT
Hello.

I understood your suggestion that SQLState 22005 is not equal to just a 
error of get method,
though there exists some message problem when setNull throws Exception 
for it.
 
Thank you.

Knut Anders Hatlen (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/DERBY-1610?page=comments#action_12432568 ]

>            
>Knut Anders Hatlen commented on DERBY-1610:
>-------------------------------------------
>
>LANG_DATA_TYPE_GET_MISMATCH is not the only exception with SQLState 22005. From SQLState.java:
>
>	String LANG_DATA_TYPE_GET_MISMATCH                                 = "22005"; // same
22005 error
>    String UNSUPPORTED_ENCODING                                        = "22005.S.1";
>    String CHARACTER_CONVERTER_NOT_AVAILABLE                           = "22005.S.2";
>    String CANT_CONVERT_UNICODE_TO_EBCDIC                              = "22005.S.3";
>    String NET_UNRECOGNIZED_JDBC_TYPE                                  = "22005.S.4";
>    String NET_INVALID_JDBC_TYPE_FOR_PARAM                             = "22005.S.5";
>    String UNRECOGNIZED_JAVA_SQL_TYPE                                  = "22005.S.6";
>
>".S.X" is only used internally and not part of the SQL state, so all of these have SQL
state 22005.
>
>EmbedPreparedStatement.setNull() calls EmbedPreparedStatement.dataTypeConversion() to
generate a data conversion exception. In fact, dataTypeConversion() uses SQLState.LANG_DATA_TYPE_GET_MISMATCH.
This means the error message is inaccurate for the setters (An attempt was made to get a data
value of type ''{0}'' from a data value of type ''{1}''.), but the SQL state is correct.
>
>  
>
>>Resolve difference of type compatibility between Embedded and NetworkServer/NetworkDriver
>>-----------------------------------------------------------------------------------------
>>
>>                Key: DERBY-1610
>>                URL: http://issues.apache.org/jira/browse/DERBY-1610
>>            Project: Derby
>>         Issue Type: Bug
>>         Components: Network Server, Network Client
>>           Reporter: Tomohito Nakayama
>>        Assigned To: Tomohito Nakayama
>>        Attachments: DERBY-1610.diff, DERBY-1610_2.diff, parameterMapping.diff, parameterMapping.diff,
parameterMapping.diff.betweenEmbedded_and_NetworkServerNetworkClient, TestNullChar.java
>>
>>
>>There exists difference of type compatibility between  Embedded and NetworkServer/NetworkClient.
>>This issue tries to resolve it.
>>    
>>
>
>  
>

-- 
/*

        Tomohito Nakayama
        tomonaka@basil.ocn.ne.jp
        tomohito@rose.zero.ad.jp
        tmnk@apache.org

        Naka
        http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/ 


Mime
View raw message