Hi Claire,
   you are passing only one parameter to the procedure it should be 2
parameters one in and one out so two (?,?) this will solve one of the
problems. Secondly it the out parameter is a cursor you have to define as
java.sql.Types.CURSOR.

Mahesh.

-----Original Message-----
From: Claire Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 28, 2000 10:07 AM
To: [EMAIL PROTECTED]
Subject: Error with Stored Procedure


Hello All,
I am calling the following stored procedure:

PROCEDURE PRC_NIALLS_TEST
(p_order_id             IN    toys_web.toys_order.order_id%TYPE,
p_order_pay_method     OUT   toys_web.toys_order.order_pay_method%TYPE)

IS
v_order_pay_method      VARCHAR2(25);
BEGIN
SELECT order_pay_method
  INTO v_order_pay_method
   FROM Toys_Order
    WHERE order_id = p_order_id;

  p_order_pay_method:=v_order_pay_method;
END;


with this java code:

CallableStatement cs=con.prepareCall("{call
TOYS_WEB.PKG_TOYS.PRC_NIALLS_TEST(?)}");
cs.setInt(1,101);
cs.registerOutParameter(2,java.sql.Types.VARCHAR);
ResultSet rs = cs.executeQuery();
while(rs.next())
{
String temp = rs.getString(1);
out.println("temp "+temp);
}

But I keep getting the following error message, I think that it has
something to do with the ResultSet:ORA-01006: bind variable does not exist
Cause: A program issued a BIND call for a variable not listed in the
associated SQL statement. Only those variables prefixed by either a colon
(:) or ampersand (&) in the SQL statement may be referenced in a BIND call,
OBIND or OBINDN. This error may also be caused by a mismatch between a
Precompiler program and the related library, SQLLIB.

Can anyone please help me at all??
Thanks in advance,
Claire


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

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

Reply via email to