Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to use IN OUT parameter

 
Sarath Mohan
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sarath,
Works for me using Oracle 9i (9.2.0.4.0) 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,
Avi.
[ September 19, 2005: Message edited by: Avi Abrami ]
 
Mike Rainville
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sarath Mohan:



What happens if you change call. to callStmt. ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic