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