JDBC 求教# Database - 数据库
p*g
1 楼
How to call stored procedure with two user-defined parameter whose name is
NUMBER_VARRAY. NUMBER_VARRAY is a VARRAY(1000)of NUMBER.The second parameter
is IN OUT.
Should I use sql.types.ARRAY?
some of code as below:
int[] p1arrorj={3,4};
ArrayDescriptor desc2=ArrayDescriptor.createDescriptor("NUMBER_VARRAY",conn);
ARRAY p1arr = new ARRAY(desc2,conn,p1arrobj);
ARRAY p2arr;
OracleCallableStatement ocs =(OracleCallableStatement)conn.prepareCall("{call
procedureName(?,?)}");
ocs.registerOutParameter
NUMBER_VARRAY. NUMBER_VARRAY is a VARRAY(1000)of NUMBER.The second parameter
is IN OUT.
Should I use sql.types.ARRAY?
some of code as below:
int[] p1arrorj={3,4};
ArrayDescriptor desc2=ArrayDescriptor.createDescriptor("NUMBER_VARRAY",conn);
ARRAY p1arr = new ARRAY(desc2,conn,p1arrobj);
ARRAY p2arr;
OracleCallableStatement ocs =(OracleCallableStatement)conn.prepareCall("{call
procedureName(?,?)}");
ocs.registerOutParameter