[ http://issues.apache.org/jira/browse/DERBY-773?page=comments#action_12360750 ]
Thomas Dudziak commented on DERBY-773: -------------------------------------- While this is true, I think it is beside the point. IMHO a JDBC driver should as a convenience feature for their users support all native Java types (e.g. the respective java.lang counterparts of byte, short, char, ...) in set-operations, simply to make life easier for the users. > PreparedStatement doesn't like Character objects when using setObject with > jdbc types CHAR/VARCHAR > -------------------------------------------------------------------------------------------------- > > Key: DERBY-773 > URL: http://issues.apache.org/jira/browse/DERBY-773 > Project: Derby > Type: Bug > Components: JDBC > Versions: 10.1.2.1 > Environment: Windows XP > Java 1.5 > Derby in Embedded or Network mode > Reporter: Thomas Dudziak > > When using > PreparedStatement ps = ... > Character value = ... > ps.setObject(0, value, Types.CHAR); > or > ps.setObject(0, value, Types.VARCHAR); > Derby complains with > "An attempt was made to get a data value of type 'VARCHAR' from a data > value of type 'java.lang.Character'." > Currently a workaround with > ps.setObject(0, value.toString(), Types.CHAR); > is necessary. -- 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
