Announcement Announcement Module
Collapse
No announcement yet.
Calling Stored Procedure in iBatis with Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling Stored Procedure in iBatis with Spring

    I cannot find any method in the SqlMapClientTemplate that can call the stored procedure defined in the iBatis?

    Is there anyone have idea on this?

    Dave :oops:

  • #2
    Proc in iBATIS

    The iBATIS documentation is a little sketchy when it comes to dealing with Stored procs. But I am able to execute stored proc via. SQLMaps. Create your sqlMap xml file and setup your proc like this:

    <procedure id="getAccounts" resultMap="accounts" parameterClass="com.j2eegeek.ibatistutorial.domain .AccountID">
    {call dbname.procname(#acctID#}
    </procedure>

    The input can be a parameterClass or just a Map.


    <parameterMap id="getAccountsCall" class="map">
    <parameter property="acctID" jdbcType="INT" javaType="java.lang.Integer" mode="IN"/>
    </parameterMap>

    Email me directly and I can give you more info. hope this helps.

    --Vinny
    http://www.j2eegeek.com/blog/

    Comment

    Working...
    X