• 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

call to oracle sp

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm trying to make a call from a servlet to an oracle stored procedure. The first two parameters in the sp are IN parameters and works fine, but the third one is an OUT parameter and doesn't work.
I have tried:
String sql = "{call udcts_pkg.sp_checkUpdateStatusUser('INparam1', 'INparam2', outparam)}";
but get the exception:
java.sql.SQLException: ORA-06550: line 1, column 56: PLS-00201: identifier 'OUTPARAM' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
if I try:
String sql = "{call udcts_pkg.sp_checkUpdateStatusUser('INparam1', 'INparam2', utparam)}";
I get the exception:
java.sql.SQLException: ORA-01008: not all variables bound }
Does anyone know how to make the call correct?
//tina
 
Tina Ljuslin
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was totally wrong and know how to do it now.
call = con.prepareCall( "{call udcts_pkg.sp_checkUpdateStatusUser( ?, ?, ?)}" );
call.setString( 1, 'inparam1');
call.setString( 2, 'inparam2' );
call.registerOutParameter( 3, Types.VARCHAR );
thanks anyway
//tina
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic