File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes JDBC / JSP /  Oracle Stored procs problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC / JSP /  Oracle Stored procs problem." Watch "JDBC / JSP /  Oracle Stored procs problem." New topic
Author

JDBC / JSP / Oracle Stored procs problem.

Rob Earls
Greenhorn

Joined: Sep 19, 2001
Posts: 12
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 )
shilpa kulkarni
Ranch Hand

Joined: Jun 07, 2000
Posts: 87
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

Joined: Sep 19, 2001
Posts: 12
Thanks!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC / JSP / Oracle Stored procs problem.