学了java很久了, 一直没用过存储过程来对数据库进行操作,请大家给几个例子吧,我学习一下。谢谢啦
解决方案 »
- Ejb3 TimerService自动启动
- java.sql.SQLException: ORA-03115: 不支持的网络数据类型或表示法
- 第一个基于weblogic的ejb3的程序没成功
- nillable和minOccurs的区别
- 一个main中的exception,请问如何解决 谢谢了
- 请教一个对servlet进行提交的问题。
- 初学j2ee,有点疑惑
- 在jsp页面里,有很多button,text等,能通过循环(js代码)或其他的方法获得type="text"?
- 用javax.xml.transform.Transform来输出XML document,怎样才能去掉Encoding属性,急急急!!!
- webservice
- struts 一个理论上的问题,都来看看知道不吧
- QQ群java王朝 -==##招人##==-
public abstract void sendDeath(String name, int age);
}
static void mapEarlyDeaths(ProcessPoetDeaths mapper){
Connection con = null;
CallableStatement toesUp = null;
try {
con = ConnectionPool.getConnection();
con.setAutoCommit(false);
CallableStatement toesUp = connection.prepareCall("{ ? = call list_early_deaths () }");
toesUp.registerOutParameter(1, Types.OTHER);
toesUp.execute();
ResultSet rs = (ResultSet) toesUp.getObject(1);
while (rs.next()) {
String name = rs.getString(1);
int age = rs.getInt(2);
mapper.sendDeath(name, age);
}
rs.close();
} catch (SQLException e) {
// We should protect these calls.
toesUp.close();
con.close();
}
} connection.prepareCall( )方式掉存储过程的