Hello
Two more thinks about the JDBC compliance, the first one is clearly a
bug but the second one it is not so clear.
1.- According to the JDBC specification
PreparedStatement.setObject(index,Boolean,targetSQLType) must work for all
the numeric and character java.sql.Types but the following methods throws
SQLException
setObject(index,new Boolean(<boolean value>),java.sql.Types.DECIMAL) on a
FIXED column fails with message
cannot convert '<boolean value>' to FIXED
setObject(index,new Boolean(<boolean value>),java.sql.Types.SMALLINT) on a
SMALLINT column fails with message
cannot convert '<boolean value>' to SMALLINT.
setObject(index,new Boolean(<boolean value>),java.sql.Types.INTEGER) on a
INTEGER column fails with message
cannot convert '<boolean value>' to INTEGER.
2.- The PreparedStatement.setObject(index,<object>) method without
targetSQLType fails only for boolean on numeric column, and succed for other
object data types, but the JDBC specification says that the setObject
without targetSQLType only maps to the corresponding SQL Type and don't do
any conversion. SAPDB do the conversion based on the column data type
whether or not an targetSQLType was specified and this can be considered
against the specification. See table 8.9.2 and 8.9.5 in
http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/mapping.html#1033804 .
It can be argued that the conversion can be in the database and not in the
driver and so the driver complies with the specification. I don't know where
the conversion takes place.
Regards
Blas Rodriguez Somoza.
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general