Solved

Passing resultset object as a parameter to oracle procedure/function

Posted on 2002-06-02
8
603 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
  • 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
 
LVL 92

Accepted Solution

by:
objects earned 100 total points
ID: 7050582
ResultSet != REF CURSOR
:-)
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now