Hello here is a codesnippet from my project ...hope this helps
The SetUploadStart() SP takes two input parameters one as string and the other an integer and returns an integer back.This code shows u how to set the inputparameters and how to retrieve the return value..
CallableStatement uplscstmt=null; try{ uplscstmt = con.prepareCall("{?=call SetUploadStart(?,?) }" ); uplscstmt.registerOutParameter(1,java.sql.Types.INTEGER); uplscstmt.setString(2,SessionID); uplscstmt.setInt(3,jobid); uplscstmt.execute(); int returncode=uplscstmt.getInt(1); System.out.println("return code"+returncode); uplscstmt.close(); } catch(Exception upe){ upe.printStackTrace(); } >From: farah<[EMAIL PROTECTED]> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology."<[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Stored Procedure! >Date: Tue, 5 Sep 2000 17:45:03 -0300 > >How can I call a stored procedure using some parameters. > >I found an example, but doesn´t have any parameters: > >CallableStatement cs = con.prepareCall ("{call STORED_PROCEDURE}"); >ResultSet rs = cs.executeQuery( ); > >Thanks!!! > >Paulo Farah > >___________________________________________________________________________ >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at http://profiles.msn.com .