SAP Knowledge Base Article - Preview

2312891 - JDBC truncation error with Numeric value - SAP SDK

Symptom

Sending a numeric variable in a parameterized statement causes error message:
Exception Stack Trace
Caused by: com.sybase.jdbc4.jdbc.SybBatchUpdateException: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: Scale error during implicit conversion of NUMERIC value '15074256.47000000067' to a NUMERIC field.
 at com.sybase.jdbc4.jdbc.ErrorMessage.raiseBatchUpdateException(ErrorMessage.java:1319)
at com.sybase.jdbc4.jdbc.SybStatement.batchLoop(SybStatement.java:2133)
at com.sybase.jdbc4.jdbc.SybStatement.sendBatch(SybStatement.java:1923)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1881)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1799)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBatch(SybPreparedStatement.java:1885)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:883)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
... 31 more


Read more...

Environment

  • SAP Adaptive Server Enterprise (ASE)
  • SAP Software Developers Kit (SDK)

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise SDK 16.0 ; Sybase Software Developer Kit 15.7

Keywords

KBA , BC-SYB-SDK , SDK , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.