• 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

JDBC / JSP / Oracle Stored procs problem.

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to call a PLSQL which has two arguments. First is an "OUT", and the second is an "IN" variable.
Encrypt(cryptpass, input) - No return value.
You pass it "input", and it passes back "cryptpass".
How can I get access to "cryptpass" via JDBC ( in java/JSP )
( This is a simple example, a lot of other stored procedures have more than one "return" value )
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After callablestat.execute() -
For a single or multiple values being returned by stored procedures as OUT parameters, use :
String cryptPass = callablestat.getString(1);
int resultInt = callablestat.getInt(n);
etc.
If the stored procedure is returning a cursor, use :
ResultSet rst = ((OracleCallableStatement)callablestat).getCursor(3);
and then : rst.get.....
 
Rob Earls
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic