You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to pass a java Character to set Object as follows:
preparedStatement.setObject(n, javaCharacter)
The column type was CHAR(1) .. This caused an immediate TypeConvertionException. Please support any reasonable Java to database type mappings. As a work-around I had to convert my Character object to a String object.
The text was updated successfully, but these errors were encountered:
The conversion of java.lang.Character to an SQL type is not specified by the JDBC specification (see Appendix B of the JDBC 4.1 specification). Therefor this is not a bug. There is only one mention of java.lang.Character in the whole JDBC spec and that is only as a reference for the javadoc on how Java treats unicode.
When I have time I will see how other drivers handle this case and make a decision to reject or treat this as an improvement based on that.
Submitted by: James Calfee (james_jcalfee.info)
Assigned to: Roman Rokytskyy (rrokytskyy)
Is related to JDBC222
I attempted to pass a java Character to set Object as follows:
preparedStatement.setObject(n, javaCharacter)
The column type was CHAR(1) .. This caused an immediate TypeConvertionException. Please support any reasonable Java to database type mappings. As a work-around I had to convert my Character object to a String object.
The text was updated successfully, but these errors were encountered: