ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tokajac <imre_to...@hotmail.com>
Subject iBatis Stored Procedure call
Date Thu, 25 Sep 2008 20:37:42 GMT


How can i call stored procedure with OUT parameters return values?

I tried with:

<procedure id="SPSSUSRSTS" parameterMap="paramsSPSSUSRSTS"  
 {call SPSSUSRSTS(?,?,?)}
<parameterMap id="paramsSPSSUSRSTS" class="map" >
  <parameter property="CSPRF" jdbcType="VARCHAR" javaType="java.lang.String"
  <parameter property="CSSTS5" jdbcType="VARCHAR"
javaType="java.lang.String" mode="INOUT"/>
  <parameter property="CSMAIL" jdbcType="VARCHAR"
<resultMap id="getStatusResult" class="UserForm">
  <result property="username" jdbcType="CHAR" column="CSPRF" />
  <result property="status"   jdbcType="CHAR" column="CSSTS5" />
  <result property="email"    jdbcType="CHAR" column="CSMAIL" />

Map<String, String> parameterMap = new HashMap<String, String>();       
parameterMap.put("CSPRF",httpServletRequest.getUserPrincipal().getName() );
parameterMap.put("CSSTS5","0" );
UserForm uf = UserDao.getSts(parameterMap);
logger.info("Status: " + uf.getStatus());

Parameters seems to be passed OK, but database remains to hang on ResultSet
log row.

I found plenty of examples around, but i haven't been able to create working
solution so far: I need tested code

View this message in context: http://www.nabble.com/iBatis-Stored-Procedure-call-tp19677828p19677828.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message