ibatis中配置存储过程,Java中用SqlMapClient调用什么方法得到结果集和返回参数 本帖最后由 james_zhw 于 2009-08-28 15:41:32 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用ibatis的人很少啊,没人帮我解决嘛!!! <parameter property="totalCount" javaType="java.lang.Integer" jdbcType="INT" mode="OUT"/>String total = null;total = (String)map.get("totalCount");@RecordCount int output --表的记录总数没有看到错误信息猜猜你传入的是String,返回的是int... String total = null; map.put("totalCount", total);@RecordCount int output --表的记录总数就是这里的问题,castexception你把map.get("totalCount")拿出对象看看,应该不是string对象。 proList = (ArrayList<MarketPro>) sqlMapClient.queryForList("selectAllProgram",map);这里好像有问题,把标红的改成insert或者update试试看。 终于搞定了,楼主试试以下的:<procedure id="selectAllProgram" parameterMap="etParameter" resultMap="xxxxx"> <![CDATA[{call dbo.sp_GetPageRecord(?,?,?,?,?,?,?)}]]></procedure> <procedure id="selectAllProgram" parameterMap="etParameter" resultMap="xxxxx"> <![CDATA[{call dbo.sp_GetPageRecord(?,?,?,?,?,?,?)}]]></procedure> 415.8%23.1为啥会计算错误 动态数据打印 请教jsp报错问题 Hibernate中如何实现分页 生成大数据量XMl时内存溢出问题 Jboss中hibernate调用数据连接池问题! (100分不多,只要能解决问题就行.)<html:text/>标签如何得到sesion中的对象属性? 返回集赋值的问题. 要选一个工作流引擎做系统了,讨论请进! 修改xsl后页面不刷新问题 struts2+spring+hibernate,启动时出错 拷贝别人写好的项目出现的问题
String total = null;
total = (String)map.get("totalCount");
@RecordCount int output --表的记录总数没有看到错误信息猜猜你传入的是String,返回的是int...
这里好像有问题,把标红的改成insert或者update试试看。
<procedure id="selectAllProgram" parameterMap="etParameter" resultMap="xxxxx">
<![CDATA[{call dbo.sp_GetPageRecord(?,?,?,?,?,?,?)}]]>
</procedure>
<procedure id="selectAllProgram" parameterMap="etParameter" resultMap="xxxxx">
<![CDATA[{call dbo.sp_GetPageRecord(?,?,?,?,?,?,?)}]]>
</procedure>