• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

invalid name pattern

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Andrea Gazzarini
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found the solution.
There was a problem on creation of type and of package of stored
Thanks all of you
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic