ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiran vuppla <kirankumar_vup...@yahoo.com>
Subject Stored Procedure Call
Date Wed, 14 Apr 2010 19:24:57 GMT

 I would like to know if the below code looks fine with syntax etc to call a stored procedure
that is created on Sql-Server DB. I would appreciate if anyone can let me know the corrections
as this is not working properly for me.

<parameterMap id="validateParms" class="map" >
     <parameter property="Id" jdbcType="INTEGER" javaType="java.lang.Integer" mode="OUT"/>

    <parameter property="TeamNo" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN"/>

<procedure id="getTeamInfo"  parameterMap="validateParms">
{? = call get_Team_Name(?)} 

Java Code:

Map<String,Object> map = new HashMap<String,Object>();
map.put("TeamNo", key);
map.put("Id",new Integer(-1));
getSqlMapClientTemplate().queryForObject("getTeamInfo", map);
(Integer) result = map.get("Id");


View raw message