String sql = {call INIT_SORT()}; CallableStatement cs = null; Connection conn = null; ResultSet rs = null; try { conn = SessionFactoryUtils.getDataSource(getSessionFactory()) .getConnection(); conn.commit(); conn.setAutoCommit(true); cs =
String sql = "{call INIT_SORT()}";
CallableStatement cs = null;
Connection conn = null;
ResultSet rs = null;
try {
conn = SessionFactoryUtils.getDataSource(getSessionFactory())
.getConnection();
conn.commit();
conn.setAutoCommit(true);
cs = conn.prepareCall(sql);
cs.execute();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
if (null != rs) {
rs.close();
}
if (null != cs) {
cs.close();
}
if (null != conn) {
conn.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉
本文系统来源:php中文网
初始化排序过程
本文介绍了一个使用 CallableStatement 来调用数据库存储过程 {call INIT_SORT()}

被折叠的 条评论
为什么被折叠?



