• 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

How to use IN OUT parameter

 
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sarath Mohan:



What happens if you change call. to callStmt. ?

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic