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

Hello!


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

I tried with:

<procedure id="SPSSUSRSTS" parameterMap="paramsSPSSUSRSTS"  
  resultMap="getStatusResult">
 {call SPSSUSRSTS(?,?,?)}
</procedure> 
 
<parameterMap id="paramsSPSSUSRSTS" class="map" >
  <parameter property="CSPRF" jdbcType="VARCHAR" javaType="java.lang.String"
mode="INOUT"/>
  <parameter property="CSSTS5" jdbcType="VARCHAR"
javaType="java.lang.String" mode="INOUT"/>
  <parameter property="CSMAIL" jdbcType="VARCHAR"
javaType="java.lang.String"mode="OUT"/>  		  		  		
</parameterMap> 
 
<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" />
</resultMap>  


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


Regards 
-- 
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.


Mime
View raw message