Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

REF_CURSOR as IN parameter?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a stored procedure in Oracle which takes an input as a REF_CURSOR. What I am intending to to from java is pass an Array of Objects which has the 2 values in each object the stored procedure is trying to break and insert.

Till now I have not been able to find the correct datatype to send to this procedure, I have'nt even got into Custom Data Types with Oracle.

Can any one please tell me if there is a data type which would let me send multiple records to be inserted through the following stored procedure:

PROCEDURE sp_test_rvf(Param1 IN r_cursor)IS
id_1 INTEGER := 0;
id_2 INTEGER := 0;
BEGIN
LOOP
FETCH Param1 INTO id_1, id_2;
EXIT WHEN param1%NOTFOUND;
INSERT INTO corr_batch_job(corr_batch_job_sid, corr_temp_sid)
VALUES(id_1, id_2);
COMMIT;
END LOOP;
END;

Thanks,
manuj
 
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic