473,503 Members | 3,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create ResultSet "from scratch" in Oracle Java Stored Procedure?

I need to create a ResultSet in an Oracle Java Stored Procedure and
return it to a PL/SQL caller. I've done quite a bit of research in
Oracle's manuals and on the Web, and have found lots of references to
going the other direction (PL/SQL passing/returning REF CURSOR to
Java), and Java returning an existing ResultSet (obtained from the
databse) as a REF CURSOR to PL/SQL. Neither of these is what I'm
looking for.

My Java stored procedure will do significant data reduction on a large
database, and then needs to return a large result set to the caller,
which will be in PL/SQL. To the PL/SQL caller, the Java stored
procedure needs to look like a "table function", but I need to create
the result set from scratch in my Java code. What I think I need is a
documented skeleton ResultSet implementation that I can extend.

Anyone know if this is available anywhere, or have pointers to
documentation?

Jim Garrison
jh*@athensgroup.com
Jul 19 '05 #1
3 13553

"Jim Garrison" <jh*@athensgroup.com> wrote in message
news:Ap********************@giganews.com...
I need to create a ResultSet in an Oracle Java Stored Procedure and
return it to a PL/SQL caller. I've done quite a bit of research in
Oracle's manuals and on the Web, and have found lots of references to
going the other direction (PL/SQL passing/returning REF CURSOR to
Java), and Java returning an existing ResultSet (obtained from the
databse) as a REF CURSOR to PL/SQL. Neither of these is what I'm
looking for.

My Java stored procedure will do significant data reduction on a large
database, and then needs to return a large result set to the caller,
which will be in PL/SQL. To the PL/SQL caller, the Java stored
procedure needs to look like a "table function", but I need to create
the result set from scratch in my Java code. What I think I need is a
documented skeleton ResultSet implementation that I can extend.

Anyone know if this is available anywhere, or have pointers to
documentation?

Jim Garrison
jh*@athensgroup.com

Did you look at the pipelined property of a function?
Jim
Jul 19 '05 #2
I assume that your Java procedure is working on some huge data in the
database, and then generating a set of rows that you want to pass on
to PL/SQL.
From Java you can batch insert the data in a temporary table. PL/SQL
can then read this table. The insert overhead in the temporary table
will be very less.

If you are using Oracle 9i you may use pipelined functions can also be
used as they they can be written in Java. But I don't know much about
Java.

Pratap
Jul 19 '05 #3
Pratap wrote:
I assume that your Java procedure is working on some huge data in the
database, and then generating a set of rows that you want to pass on
to PL/SQL.
From Java you can batch insert the data in a temporary table. PL/SQL
can then read this table. The insert overhead in the temporary table
will be very less.

If you are using Oracle 9i you may use pipelined functions can also be
used as they they can be written in Java. But I don't know much about
Java.

Pratap


Sounds like what I need, except I can't find in Oracle's
documentation the Java equivalent of the PL/SQL "PIPE ROW"
statement. You say pipelined functions can be written in Java...
do you have any pointers to documentation?

Thanks

Jim Garrison
jh*@athensgroup.com
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
19966
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
3
1340
by: e01osama | last post by:
I am new to java. I inatalled oracle. I need to display some of the data from table. that table is from oracle.I want to know how to get that data in to interface. pls help.
2
10568
by: Twan Kennis | last post by:
Question: How do I pass a returning resultset from a nested Stored Procedure (which opens a cursor including option "WITH RETURN TO CALLER") as a returning resultset from it's own? When I...
9
47164
by: Nikolay Petrov | last post by:
How to fill DataSet from stored procedure?
0
1356
by: HJ | last post by:
Hi all, I am experiencing a weird issue and I hope you can help. We are using a Microsoft Access 2003 project (.ade) with an SQL Server 2000 database. One form contains a list box with the...
2
5692
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I can successfully insert and update the oracle database by calling a oracles stored proc from my .net code. This oracle stored proc is returning some value. I cannot see that...
1
1950
by: bbawa1 | last post by:
I have a stored proceure whic is returning a table. Now I need ADO.Net statement So that I can pass parameters to this stored procedure and get Retuened table from stored procedure. Could you...
1
2089
by: Nils | last post by:
I would like to have the SPinner() to return the cursor (cc) to SPouter, which returns it to caller (client). My simple procedures is as follows: CREATE PROCEDURE SPinner () LANGUAGE SQL...
3
950
by: Jim Garrison | last post by:
I need to create a ResultSet in an Oracle Java Stored Procedure and return it to a PL/SQL caller. I've done quite a bit of research in Oracle's manuals and on the Web, and have found lots of...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.