My question is how do I receive that array in
Java. To start, I send 2 arrays, int and varchar2 as parameters in my pl/sql function. So, I'm only interested in the java program, the code below is what I started. Could anyone tell me if I'm doing it right. Thanks in advance for any help.
StructDescriptor desc1=StructDescriptor.createDescriptor("RECTYPE",ora._con);
STRUCT p1struct = new STRUCT(desc1, ora._con, p1obj1.toArray());
STRUCT p2struct = new STRUCT(desc1, ora._con, p1obj2.toArray());
OracleCallableStatement ocs = (OracleCallableStatement )
ora._con.prepareCall("{call " +
"pegasustypes.show_pegasus(?,?,?,?)}");
ocs.setOracleObject(1, p1struct);
ocs.setOracleObject(2, p2struct);
ocs.setString(3, ownerid);
ocs.setInt(4, num);
ocs.registerOutParameter(1,OracleTypes.STRUCT,"RECTYPE");
ocs.registerOutParameter(2,OracleTypes.STRUCT,"RECTYPE");
ocs.registerOutParameter(3,OracleTypes.CURSOR);
ocs.execute();
ora._rs=(ResultSet)ocs.getObject(1);
while (ora._rs.next()){
System.out.println(ora._rs.getString("pegasus_id").toString());
}