public String findreducefinish(String deptid){
String i="";
String pSql = "{call TASK_REDUCE_SSPG(?,?)}"; //两个参数一个是输入参数一个是输出参数
Connection con = null;
CallableStatement stCall = null;
try {
con = this.getSession().connection();
stCall = con.prepareCall(pSql);
stCall.setString(1, deptid);
stCall.registerOutParameter(2, Types.VARCHAR);
stCall.execute();
i = stCall.getString(2);
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
con.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
return i;
}
Java调用oracle 存储过程
最新推荐文章于 2021-12-16 23:23:31 发布