Here is how I do
rs = ResultSet
cstmt = CallableStatement
cstmt = conn.prepareCall("begin PACKAGE.procedure(?,?,?); end;");
cstmt.registerOutParameter(1, OracleTypes.CURSOR);
cstmt.setString(2, para1);
cstmt.setString(2, para2);
cstmt.execute();
rs = ((OracleCallableStatement)cstmt).getCursor(1);
while(rs.next())
{
// Like a normal rs
}
As you can see I have the Cursor as a parameter, but if you have a
"storedFunction" I guess you could return the Cursor also...
Hoped it helped
// Jan Aren�
-----Ursprungligt meddelande-----
Fr�n: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]F�r SriHari
Skickat: den 31 oktober 2001 12:06
Till: [EMAIL PROTECTED]
�mne: Tomcat: jsp : JDBC & ORACLE
I am using Stored(Functions) in oracle which return cursors type(multiple
rows)
How can i allot them to resultset in jsp /Java code
How to call the function in java code so that i can use the rows just like i
have used the result using SQL server/Access as my database
ie i have used Resultset in SQL database (Result set in java code)
how can i use Cursors in Oracle to use them in jsp/java (???????);
Regards
SriHari
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com