呵呵,不用hibernate当然可以实现,这个我知道所以我问在hibernate里能不能实现嘛?不过直接通过hibernate实现的话,又没有通过hibernate的变通一下的办法啊?
解决方案 »
- 怎么把一段文字加入到一个JPanel里面,并且这个JPanel是可以滚动的~~
- Junit测试 struts中action的某一个方法
- js如何获取action发到jsp中的对象
- 急求以下spring标准答案(高手请进)
- 我配置服务器时addtomcat5.5点finish时出现错误:
- 如何将html文件转换成TIFF(传真文件)
- html:select让它显示数据库的内容,页面如何设置呀?
- proxool0.9.0链接池遇到问题
- springMVC获取前台表单值为空
- microsoft IIS与tomcat可否并存?
- 请问有哪位高人用过resin呀!!怎么配置第一个helloservlet
- <html-el:checkbox 如何被选中
假如我们创建了以下存储过程:
create or replace procedure batchUpdateCustomer(p_age in number) as
begin
update CUSTOMERS set AGE=AGE+1 where AGE>p_age;
end;
存储过程中有一个参数p_age,代表客户的年龄,应用程序可按照以下方式调用存储过程:
代码内容
tx = session.beginTransaction();
Connection con=session.connection();
String procedure = "{call batchUpdateCustomer(?) }";
CallableStatement cstmt = con.prepareCall(procedure);
cstmt.setInt(1,0); //把年龄参数设为0
cstmt.executeUpdate();
tx.commit();