Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Returning ResultSets from Oracle to Java

Returning ResultSets from Oracle to Java

From: hod <hod007_at_my-deja.com>
Date: Wed, 08 Mar 2000 13:41:06 GMT
Message-ID: <8a5l9h$hbk$1@nnrp1.deja.com>


 Hi,
 This may be a very simple question, but I just can't seem to find an answer. I have been using MS SQL Server & Sybase SQL Server for a number of years. In both of these DBMS I can create a procedure which will return a resultset, without using output parameters. So from what I can tell in Oracle the way to do this is with a function. Since for the sake of an example I want to return the results of a simple statement like (SELECT LName FROM Sales WHERE State = 'NY'). Would I return a TABLE (which I defined in a package or should I return a cursor?
Question 2: I have tried doing this by having the function return a TABLE. But I do not know how to access it in java. I used java.sql.CallableStatement where My query looked like this. "{ ? = call packSales.fetchSalesNames(?)}" and then attempted to register the first out put parameter as a Types.ARRAY however I am using the ODBC / JDBC bridge and the driver I am using says it does not support the ARRAY type. Which all might be moot because I'm not positive that this is the way I should be doing this.

Any Help would be greatly appreciated.
-Hod

hod007_at_my-deja.com

--



hod007_at_my-deja.com

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Mar 08 2000 - 07:41:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US