wood burning stoves
The moose likes Oracle/OAS and the fly likes How to use IN OUT parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "How to use IN OUT parameter" Watch "How to use IN OUT parameter" New topic

How to use IN OUT parameter

Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
I have stored procedure where I want to pass one value to the Stored procedure get another value after the execution of the procedure. I used IN OUT parameter in the Stored procedure.

And used the followin code

New element number always comes as -2.
I should pass -2 for some kind of checking in side stored procedure.
after execution this parameter should contain the new Number.

Am I doing wrong anywhere?
Please help


Sarath Mohan
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

Works for me using Oracle 9i ( on SUN [sparc] Solaris 9, JDK 1.5.0_04 and the latest Oracle JDBC driver: ojdbc14.jar

First, the definition of my [PL/SQL] procedure:

And now, my java code for invoking the P0 procedure:

Good Luck,
[ September 19, 2005: Message edited by: Avi Abrami ]
Mike Rainville
Ranch Hand

Joined: May 29, 2004
Posts: 36
Originally posted by Sarath Mohan:

What happens if you change call. to callStmt. ?
I agree. Here's the link: http://aspose.com/file-tools
subject: How to use IN OUT parameter
It's not a secret anymore!