ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad Balmer <bbal...@peapod.com>
Subject Re: How to pass a parameter with DECIMAL data type
Date Tue, 12 Sep 2006 20:59:21 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
If you are using MySQL 5, could this be an issue using <code
 class="literal">strict</code> sql mode?<br>
<a class="moz-txt-link-abbreviated" href="mailto:Cs2000xli@cs.com">Cs2000xli@cs.com</a>
<blockquote cite="midc40.278ac8b.3238769e@cs.com" type="cite"><font
 face="arial,helvetica"><font ptsize="10" family="SANSSERIF"
 face="Arial" lang="0" size="2">I am passing a parameter for DECIMAL(5,
2) to a stored procedure. I have the following parameterMap.<br>
&lt;parameterMap id="getInfoMap" class="map" &gt;<br>
&nbsp; &lt;parameter property="dollarAmount" jdbcType="DECIMAL"
javaType="java.math.BigDecimal" mode="IN"/&gt;<br>
&lt;procedure id="getInfo" parameterMap="getInfoMap"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {call sp_getInfo(?)}<br>
When I call the stored procedure using DAO object, I got the following
error sql error with the cause.<br>
--- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data
truncated for column 'dollarAmount' at row 1<br>
What did I do wrong?<br>
<pre class="moz-signature" cols="72">-- 

Brad Balmer
Application Architect
Peapod, Inc.

This email may contain confidential or legally privileged information that is intended only
for the individual or entity named as the recipient. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or reliance upon the contents
of this email is strictly prohibited. If you have received this email in error, please contact
the sender so that proper delivery can be arranged, and then please delete this message. Thank

View raw message