aspose file tools*
The moose likes Oracle/OAS and the fly likes invalid name pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "invalid name pattern" Watch "invalid name pattern" New topic
Author

invalid name pattern

Andrea Gazzarini
Ranch Hand

Joined: Sep 09, 2002
Posts: 125
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


Regards,<br />Andrea<br /> <br /><a href="http://www.linkedin.com/in/andreagazzarini" target="_blank" rel="nofollow">Andrea Gazzarini</a><br />Skype ID : gazzax72<br />Google Talk ID : a.gazzarini@gmail.com<br /><a href="http://www.andreagazzarini.blogspot.com" target="_blank" rel="nofollow">My Blog</a>
Andrea Gazzarini
Ranch Hand

Joined: Sep 09, 2002
Posts: 125
I have found the solution.
There was a problem on creation of type and of package of stored
Thanks all of you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: invalid name pattern
 
Similar Threads
help in creating procedure
How to pass a two dimensional Object Array To a Stored Procedure
trouble passing array to stored procedure in spring HELP
java.sql.SQLException: invalid name pattern
Stored procedure which returns array