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 REF_CURSOR as IN parameter? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "REF_CURSOR as IN parameter?" Watch "REF_CURSOR as IN parameter?" New topic
Author

REF_CURSOR as IN parameter?

Manuj Bawa
Greenhorn

Joined: Dec 13, 2004
Posts: 7
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: REF_CURSOR as IN parameter?