Connection conn = null; ResultSet rs = null; CallableStatement statm = null; List<ClubStatisticeVo> listVo = new ArrayList<ClubStatisticeVo>(); //调用存储过程,返回sql conn = JdbcUtil.getConnection(); statm = conn.prepareCall("{call pro_rpt_all_statistics_s(?,?,?)}"); statm.registerOutParameter(3, java.sql.Types.VARCHAR); statm.setString(1, month); statm.setString(2, dept); statm.executeUpdate(); String result = statm.getString(3); PreparedStatement ps = conn.prepareStatement(result); rs = ps.executeQuery();
本文出自 “小浩” 博客,请务必保留此出处http://zhangchi.blog.51cto.com/5214280/1392285