现在有一个存储过程:tnrpGraphBlobConverter
:
CREATE OR REPLACE Procedure tnrpGraphBlobConverter(graphBlob in Blob, RefCursor In Out dctypes.cursorType)
As
value_Array1 TNNUMBERMARRAY;
value_Array TNNUMBERMARRAY;
Begin
value_Array1 := TNNUMBERMARRAY();
value_Array := TNNUMBERMARRAY();
tnrpGraphBlobConverterJava(graphBlob, value_Array1, value_Array);
Open RefCursor For
SELECT ROW_NUMBER() over (order by 1) as MyRow, tmp.COLUMN_VALUE as MyValue from TABLE(value_Array) tmp;
End;
其中,tnrpGraphBlobConverterJava
这个存储过程是:
CREATE OR REPLACE Procedure tnrpGraphBlobConverterJava(graphBlob in Blob,graphDataDesc in TNNumbermArray, graphData in out TNNumbermArray)
As Language Java Name 'ToolsNetUtility.tnrpGraphBlobConverterJava(oracle.sql.BLOB, oracle.sql.ARRAY, oracle.sql.ARRAY[])';
请问,第一个存储过程中, RefCursor 是什么意思啊,应该传给他一个什么样的参数呢?
另外,如何用 java 来执行这个存储过程呢?其中这个 In Out 类型应该如何传参呢?
1
shiyiwan 2016-09-28 21:59:23 +08:00
Ref Cursor 是 Oracle 的动态游标类型, Java 读取时应该可以 oracle.jdbc.driver.OracleTypes.CURSOR 类型。
用法参考一下链接 http://www.databasedesign-resource.com/oracle-ref-cursor-in-java.html |