2012年6月27日

Oracle的数组(转)

摘要: 代码段如下:复制代码代码如下:declaretype t_indexby is table of numberindex by binary_integer;type t_nesteed is table of number;type t_varray is varray(10) of number;v_indexby t_indexby;v_nested t_nested;v_varray t_varray;beginv_indexby(1):=1;v_indexby(2):=2;v_nested:=t_nested(1,2,3,4,5);v_varray:=t_varray(1,2);en 阅读全文

posted @ 2012-06-27 11:17 Panda_Luffy 阅读(679) 评论(0) 推荐(0) 编辑

java程序调用 Oracle函数 返回结果集(数组,游标)

摘要: (1)返回数组:新建数组类型,此处以nested table类型的数组举例:create or replace type XH is table of varchar2(32);程序调用如下:filterAuditGraduation函数返回XH类型数组,程序调用得到返回的varchar数组。 1 Connection conn = null; 2 OracleCallableStatement stmt = null; 3 Class.forName("oracle.jdbc.OracleDriv... 阅读全文

posted @ 2012-06-27 11:05 Panda_Luffy 阅读(984) 评论(0) 推荐(0) 编辑

web程序测试时如何加载spring配置文件中的bean

摘要: 测试web程序时如何加载spring配置文件中的bean。在做web开发的时候时候会经常用到,分布测试,可以避免反复重启服务器,方便spring配置成功与否的测试,主要用到ApplicationContext获取上下文。(1)在java文件中:主要用于jUnit测试1 导包:2 import org.springframework.context.ApplicationContext;3 import org.springframework.context.support.ClassPathXmlApplicationContext;4 获取bean:5 ... 阅读全文

posted @ 2012-06-27 10:13 Panda_Luffy 阅读(565) 评论(0) 推荐(0) 编辑

导航