I believe this has actually been on the list several times over the last few
days. Assuming you have a PL/SQL function that returns a REF CURSOR type,
you can do something like this:
CallableStatement cs = con.prepareCall("{? = call
package_name.function_name}");
cs.registerOutParameter(1,OracleTypes.CURSOR);
cs.execute();
ResultSet rs = (ResultSet)cs.getObject(1);
Then, just access it like any other ResultSet. If you aren't using a
package, just drop out the "package_name." part above. Also, to get the
OracleTypes class, you should import the oracle.jdbc.driver package like:
import oracle.jdbc.driver.*;
If all you are going to use is OracleTypes, you could obviously import this
only instead of everything.
Mark
-----Original Message-----
From: Mutahar Qayum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 28, 2000 12:57 PM
To: [EMAIL PROTECTED]
Subject: Oracle Stored Procedure from JSP
How can i retreive resultset from stored procedures from JSP , iam using
JDBC.
thanks a million.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets