ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cs2000...@cs.com
Subject How to pass a parameter with DECIMAL data type
Date Tue, 12 Sep 2006 16:46:22 GMT
I am passing a parameter for DECIMAL(5, 2) to a stored procedure. I have the 
following parameterMap.
<parameterMap id="getInfoMap" class="map" >
      <parameter property="dollarAmount" jdbcType="DECIMAL" 
javaType="java.math.BigDecimal" mode="IN"/>
<procedure id="getInfo" parameterMap="getInfoMap">
      {call sp_getInfo(?)}

When I call the stored procedure using DAO object, I got the following error 
sql error with the cause.

--- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data 
truncated for column 'dollarAmount' at row 1

What did I do wrong?



View raw message