Hai all

 By using JDBC CallableStatement  i am executing Oracle Stored Functions and
Procedures 
 In Procedures like Insert Update and Delete I have to know the no of
records updated 
 When i am calling a Oracle Stored Procedure processing(DML operations like
insert,update,delete)   
 commands
 How can i get the Inserted/Deleted/Updated no of Record  as 
 callablestatement.getUpdateCount method dosent return no of rows effected 


 

Thanks 
Srihari
-----Original Message-----
From: SriHari 
Sent: Wednesday, October 31, 2001 6:47 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat: jsp : JDBC & ORACLE


Thanks for the code  
i am using classes111.zip 
i was not getting 
OracleTypes from oracle.jdbc.OracleTypes 
can u point me to the resource 


Thanks Again 

Srihari


-----Original Message-----
From: Jan Aren� [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 6:09 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat: jsp : JDBC & ORACLE


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

==========================================================================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

Reply via email to