• 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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
reply
    Bookmark Topic Watch Topic
  • New Topic