?
Solved

Passing resultset object as a parameter to oracle procedure/function

Posted on 2002-06-02
8
Medium Priority
?
622 Views
Last Modified: 2012-06-27
1. I will have a resultset object in java program with certain rows
2. I will have a oracle procedure/function with one of the parameter defined as REF CURSOR, which I will be looping through inside the program to process
3. and I will call the oracle procedure through JDBC, using resultset object as one of the parameter to be sent to the oracle procedure/function.


Is this possible ?!!!


0
Comment
Question by:srinusimhadri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 92

Expert Comment

by:objects
ID: 7050285
No.
0
 

Author Comment

by:srinusimhadri
ID: 7050292
jdbc, not yet sophisticated ?!!!
or is it oracle ?!!!
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 7050495
Here is something to keep in mind when working with the ResultSet,  "A ResultSet object is automatically closed when the Statement object that generated it is closed, re-executed, or used to retrieve the next result from a sequence of multiple results. "  (from the JavaDocs)

Therefore, if you will be working with what would basicall be a controlling ResultSet you will have problems.  The data will dissappear.  But, luckily there are collections.  Use a collection like a Vector.  Since it is a table structure use a vector of vectors (similar to the JTable constructor).  The outer vector holds many inner vectors, which can contain the String, Integer, Boolean values (or whatever you are using, but make sure it is the wrapper class when working with the primitives.)  It is the collection that you will want to use to control the program, and the result set to verify and to obtain the data.  

Tom
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 7050582
ResultSet != REF CURSOR
:-)
0
 

Author Comment

by:srinusimhadri
ID: 7052735
WELL,
technically NO,
but,
a variable declared to be a resultset, is capable of holding a set of rows (theoritically called a cursor).
AND
a variable declared to be REF CURSOR also is capable of bolding a set of rows.
0
 

Author Comment

by:srinusimhadri
ID: 7052742
and we have features like casting, coercing or converting or whatever to facilitate data interchange.
0
 

Author Comment

by:srinusimhadri
ID: 7052824
sorry, typo in my earlier message...
I said...
"a variable declared to be REF CURSOR also is capable of bolding a set of rows."

I meant to say "holding" not "bolding"
0
 

Author Comment

by:srinusimhadri
ID: 8443186
I hope this answer is still valid (even for the new versions).


:-}
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question