File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error in updating a table in mysql using IBATIS

vishnu neerukattu
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to update a table in mysql using ibatis and I have to update an enum value and I have given jdbctype for that property as varchar.
when I am executing in I am getting an error as below.can someone help me in this regard.
Please find the code below
here strModRole is declared as enum in the procedure.

<parameterMap id="addParameters" class="java.util.Map" >
<parameter property="strDrs" jdbcType="FLOAT" javaType="java.lang.Float" mode="IN"/>
<parameter property="strUts" jdbcType="FLOAT" javaType="java.lang.Float" mode="IN"/>
<parameter property="strRout" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strSer" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strModId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>
<parameter property="strModRole" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>

<procedure id="test" parameterMap="addParameters">
{call temp.sp_SET_values(?,?,?,?,?,?)}

The error is as below
Cause: java.sql.SQLException: Data truncated for column 'in_mod_role' at row 1>
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic