Session s = this.getSession();
Connection con = s.connection();
CallableStatement cstm = null;
try {
cstm = con
.prepareCall("{call EVS_GENERATION_NUMBER_PKG.get_generation_number(?,?,?,?,?,?,?)}");
cstm.setString(1, companyCode);
cstm.setString(2, deptCode);
cstm.setString(3, docTypeCode);
cstm.setString(4, subDocTypeCode);
cstm.setString(5, periodNameCode);
cstm.setString(6, numberCode);
cstm.registerOutParameter(7, Types.VARCHAR);
cstm.execute();
rtnStr = cstm.getString(7);
cstm.close();
con.close();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (cstm != null) {
cstm.close();
cstm = null;
}
if (con != null) {
con.close();
con = null;
}
} catch (Exception e) {
e.printStackTrace();
}
}
java执行存储过程
最新推荐文章于 2021-12-23 19:31:27 发布