[ 
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.

-- 
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

        

Reply via email to