Hi,
Now, i met a problem that using JDBC to connect to the HANA DB via a Java Tool.
We defined a table have one column which type is decimal(38,0), then we use java statement like below:
PreparedStatement st = hana.prepareStatement("insert into abc.test values (?)");
st.setBigDecimal(1, new BigDecimal("15950736261379882735954044794195154896"));
st.executeUpdate();
After we execute this example application we got the exception like below:
com.sap.db.jdbc.exceptions.jdbc40.SQLDataException: [314]: numeric overflow:
at com.sap.db.jdbc.exceptions.jdbc40.SQLDataException.createException(SQLDataException.java:40)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:278)
at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:185)
at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1130)
at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:877)
at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:492)
at com.sap.db.jdbc.CallableStatementSapDB.execute(CallableStatementSapDB.java:341)
at com.sap.db.jdbc.CallableStatementSapDB.executeUpdate(CallableStatementSapDB.java:884)
at com.sap.db.jdbc.trace.PreparedStatement.executeUpdate(PreparedStatement.java:174)
But in the HANA studio i can execute same sql statement successfully. Do someone knows the root cause? is that we need to apply for a new JDBC version for HANA?
Thanks
Steven