Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.8.2.2
-
None
-
Windows 7 (All)
-
Normal
Description
Scenario (on 10.8.2.2; with 10.5.1.1 the problem does not appear): when setting BIT from this example :
rsSch.createTab("Bit_Tab",sqlp,conn);
String sMaxBooleanVal = rsSch.extractVal("Bit_Tab",1,sqlp,conn); //value is “1“
cstmt = conn.prepareCall("
");
cstmt.setObject(1,sMaxBooleanVal,java.sql.Types.BIT); //-> throws the exception below
Exception (Problem with not supporting “0” and “1” for the type BIT; moreover, confusing message):
java.sql.SQLDataException: Invalid character string format for type BOOLEAN.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
at org.apache.derby.client.am.PreparedStatement.setObject(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:166)
at com.sun.ts.tests.jdbc.ee.callStmt.callStmt10.callStmtClient10.testSetObject48(callStmtClient10.java:812)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Attachments
Issue Links
- relates to
-
DERBY-4964 Client driver fails to convert string to boolean with setObject(col, str, Types.BIT)
- Closed
-
DERBY-4965 Boolean to char conversion results in integer
- Closed