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">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<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>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Cs2000xli@cs.com">Cs2000xli@cs.com</a>
wrote:
<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;/parameterMap&gt;<br>
&lt;procedure id="getInfo" parameterMap="getInfoMap"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {call sp_getInfo(?)}<br>
&lt;/procedure&gt;<br>
  <br>
When I call the stored procedure using DAO object, I got the following
error sql error with the cause.<br>
  <br>
--- Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data
truncated for column 'dollarAmount' at row 1<br>
  <br>
What did I do wrong?<br>
  <br>
Thanks!<br>
  <br>
Xiao.<br>
  <br>
  </font></font></blockquote>
<br>
<pre class="moz-signature" cols="72">-- 

___________________________
Brad Balmer
Application Architect
Peapod, Inc.
847-583-6306

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
you.</pre>
</body>
</html>


Mime
View raw message