• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to return the index by variable from pl/sql to java

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have the problem for the following scenario,

String SP ="{? = call f1() }";
lCallableStatement = conn.prepareCall(SP);
lCallableStatement.registerOutParameter(1,Types.STRUCT);
lCallableStatement.execute();

At back end(oracle):
SQL> create or replace package p1
as
type a is table of varchar2(20) index by varchar2(20);
end p1;
/

Package created.

SQL> create or replace function f1 return p1.a
2 as
3 o1 p1.a;
4 begin
5 o1('active'):='true';
6 dbms_output.put_line('val is'||o1('active'));
7 return o1;
8 end;
9 /

Function created.

BUG:
but i got the error while run the code.

SQ exception:2002 invalid column type:


If anyone have the suggestion then tell me.
with regards,
ganesh.s
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic