07 2013 档案
摘要:http://sunbin123.iteye.com/blog/1007556使用Spring JdbcTemplate调用存储过程Spring的SimpleJdbcTemplate将存储过程的调用进行了良好的封装,但可惜只能用于jdk1.5的环境,无法再jdk1.4环境下使用,而JdbcTemplate则完全适用于jdk1.4下的环境,下面列出使用JdbcTemplate调用Oracle存储过程的一些方法:一) 无返回值的存储过程调用存储过程:Java代码1:CREATEORREPLACEPROCEDURETESTPRO(PARAM1INVARCHAR2,PARAM2INVARCHAR2)A
阅读全文
摘要:--创建包create or replace package pac_stuas type cur_stu is ref cursor; procedure getStu(i in number,cur_stu out cur_stu);end pac_stu;--创建包体create or replace package body pac_stuasprocedure getStu(i in number,cur_stu out cur_stu) as nums number(10); begin select count(*) into nums from stu; if nums...
阅读全文
摘要:create procedure proc_1 asbegin dbms_output.put_line('hello boy ');end proc_1;--set serveroutput on; exec proc_1;create or replace procedure proc_2(v_1 in varchar2,v_2 out varchar2)asbegin v_2:='hello ' || v_1;end proc_2;/*declare v_2 varchar2(100);begin proc_2('boy',v_2); db
阅读全文
摘要:转自:http://blog.sina.com.cn/s/blog_477252210100a7l4.html1、使用org.codehaus.xfire.spring.XFireSpringServlet与ServiceBean1.1 web.xml的配置contextConfigLocationclasspath:applicationContext-webservice.xmlorg.springframework.web.util.Log4jConfigListenerorg.springframework.web.context.ContextLoaderListenerXFireS
阅读全文
摘要:一 先来看 为整合的Mybatis 使用过程1 接口服务public interface ServerDao{ public User selUser(username);//根据用户名查找用户对象信息 }2 接口服务对应的sql映射文件(serverdao.xml)//xml 前缀。。。 3 mybatis_config 配置//xml 前缀。。。//配置数据源 //配置拥有的 映射文件 4 dao 类 String resource = "resource/mybatis-config.xml"; Reader reader = null; reader = ...
阅读全文
摘要:一 建序列create sequence squence_name increment by 1 --按1增长 start with 1 --从1开始 nomaxvalue --不设最大值 nocycle --不循环 cache 10; --缓冲create sequence seq_f...
阅读全文

浙公网安备 33010602011771号