File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Oracle/OAS and the fly likes How to Pass Cursor Row as a parameter to another Function? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "How to Pass Cursor Row as a parameter to another Function?" Watch "How to Pass Cursor Row as a parameter to another Function?" New topic
Author

How to Pass Cursor Row as a parameter to another Function?

Sandeep John
Greenhorn

Joined: Jun 29, 2011
Posts: 3
Hi All,

I Have Cursor



Now I need to pass each row from cursor ABC as a parameter to FUNCTION().

Can some one tell me how to do that?

Gene Hilpert
Ranch Hand

Joined: May 22, 2002
Posts: 49

I'm not sure if you want to call the function for each row in the select or if you want pass the cursor to the function.
For the first case include the function in the select
I.E.


For the second



Then call it like:


Hope this helps.

Sandeep John
Greenhorn

Joined: Jun 29, 2011
Posts: 3
I guess you dint get my question correctly, Let me explain more detail..

From above example I have Cursor ABC.

Instead of doing
FUNCTION(REC.Col1, REC.Col2, REC.Col3)


I wanna send each record completely, what is the correct procedure of doing below

FUNCTION(REC);

Martin Vajsar
Bartender

Joined: Aug 22, 2010
Posts: 2329
    
    2

Welcome to the Ranch, Sandeep!

Please re-read Gene's answer. Does it pass individual columns from the cursor to the function or not?

Alternatively, you might perhaps use the %ROWTYPE attribute.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to Pass Cursor Row as a parameter to another Function?
 
Similar Threads
JDBC & oracle function
Error in jdbc while executing procedure
How I can pass Cursor as In parameter
bean message in javascript
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state