Hi,
I'm doing a call to a stored procedure Oracle 9i using a type defined .
When it executes the follow istruction
Java :
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("SGP.PAK_SGP.V_ARRAY", myDB.getConnection());
throws the exception :
java.sql.SQLException: Invalid name
pattern The code of stored is :
Create or replace package PAK_SGP as
type v_array is table of varchar2(60) index by binary_integer;
procedure SP_InsertProspect(
P_IDPROGETTO in varchar2,
......
P_IDMERCATORIF in varchar2,
P_TIPOCLIENTE in varchar2,
ARR_PERS_CONV in v_array,
ritorno out number);
end PAK_SGP;
/
Create or replace package body PAK_SGP as
procedure SP_InsertProspect(
P_IDPROGETTO in varchar2,
.....
P_TIPOCLIENTE in varchar2,
ARR_PERS_CONV in v_array,
ritorno out number) is
D_DATAINIZIO_ATTIVITA_PP date;
......................
N_IDSTATOPROBABILITA number;
N_IDMERCATORIF number;
r number;
begin
.....................
The used Java code is :
.......
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("SGP.PAK_SGP.V_ARRAY", myDB.getConnection());
logger.debug("Sono dopo al descrittore ...");
String arrayValues[] = {"marco", "maiolico"};
ARRAY array = new ARRAY(arrayDesc, myDB.getConnection(), arrayValues);
//((oracle.jdbc.driver.OraclePreparedStatement)ps).setARRAY(1, array);
String strSQL = myDB.getStProcCall("PAK_SGP.SP_InsertProspect", 34);
cstmt = myDB.getConnection().prepareCall(strSQL);
...........
cstmt.setArray(33,array);
..........
where SGP is the SID and PAK_SGP is the package name that cointains type V_ARRAY and the stored .
Thanks in advance
Grazie 1000,
Marco
P.S. Sorry for my English. I'm Italian