public static String GET_VALIDATEMESSAGE_STATEMENT = "begin get_message(?); end;";
Sajag Patel Nuventive Software Engineer [EMAIL PROTECTED] -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Janssen Sent: Tuesday, June 03, 2003 9:32 AM To: [EMAIL PROTECTED] Subject: Re: Retrieving A cursor from an Oracle Stored Procedure what is in: GET_VALIDATEMESSAGE_STATEMENT > -----Original Message----- > From: Sajag Patel [SMTP:[EMAIL PROTECTED] > Sent: 03 June 2003 03:16 > To: [EMAIL PROTECTED] > Subject: Retrieving A cursor from an Oracle Stored Procedure > > I am trying to retrieve a cursor to return a resultset from an oracle > stored procedure. And I am getting the following error: > > ORA-01006: bind variable does not exist begin > get_message(1); end; > > Here's my code: > > Connection c = null; > ResultSet rs = null; > CallableStatement cstmt = null; > > try { > c = > com.nuventive.iwebfoliov2.database.DBAppConnection.getConnection(); > cstmt = c.prepareCall(GET_VALIDATEMESSAGE_STATEMENT); > cstmt.registerOutParameter(1,OracleTypes.CURSOR); > cstmt.setInt(1, userID); > cstmt.execute(); > if(!(cstmt.wasNull())){ > rs = ((OracleCallableStatement)cstmt).getCursor(1); > while (rs.next()) { > System.out.println(rs.getString(1)); > MessageCenter mes = new MessageCenter(rs.getString(1), > rs.getString(2), rs.getString(3), rs.getString(4)); > userMessages.add(mes); > } > } > > Can anyone please provide some help. Thanks. > > Sajag Patel > Nuventive > Software Engineer > [EMAIL PROTECTED] > > ======================================================================== == > = > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > > http://java.sun.com/products/jsp > http://archives.java.sun.com/jsp-interest.html > http://forums.java.sun.com > http://www.jspinsider.com -- It is the strict policy of Truworths that its e-mail facility and all e-mail communications emanating therefrom, should be utilised for business purposes only and should conform to high professional and business standards. Truworths has stipulated certain regulations in terms whereof strict guidelines relating to the use and content of e-mail communications are laid down. The use of the Truworths e-mail facility is not permitted for the distribution of chain letters or offensive mail of any nature whatsoever. Truworths hereby distances itself from and accepts no liability in respect of the unauthorised use of its e-mail facility or the sending of e-mail communications for other than strictly business purposes. Truworths furthermore disclaims liability for any unauthorised instruction for which permission was not granted. Truworths Limited accepts no liability for any consequences arising from or as a result of reliance on this message unless it is in respect of bona fide Truworths business for which proper authorisation has been granted. Any recipient of an unacceptable communication, a chain letter or offensive material of any nature is requested to notify the Truworths e-mail administrator ([EMAIL PROTECTED]) immediately in order that appropriate action can be taken against the individual concerned. ======================================================================== === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com 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 archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
