登 录
jdbcTemplate.execute( new CallableStatementCreator() { public CallableStatement createCallableStatement(Connection conn) { try { CallableStatement cs = conn.prepareCall("{ call PROC_A(?, ?) }"); cs.setString(1, bizType); cs.registerOutParameter(2, Types.VARCHAR); return cs; } catch (SQLException e) { e.printStackTrace(); } return null; } }, new CallableStatementCallback() { public Object doInCallableStatement(CallableStatement cs) { try { cs.execute(); return cs.getString(2); } catch (SQLException e) { e.printStackTrace(); } return ""; } });
抱歉!评论已关闭.