Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Calling An Oracle Procedure

Calling An Oracle Procedure

From: MChristy <mchristy433_at_yahoo.com>
Date: 5 Nov 2004 09:04:31 -0800
Message-ID: <53143d38.0411050904.2e8309c9@posting.google.com>


Hope someone can help. I'm new to Oracle/PL/Sql and more or less I am following the examples in the book. I wrote a small procedure listed below but I am having trouble with the syntax when trying to call the procedure. The procedure compiled successfully but yet when I issue the following command from the PL/SQL Developer Command window I get this error ORA-01008: not all variables bound. Hope someone can help and maybe give me a few tips.

Thanks,
Mike...

exec trmjc.testcursor(703233004,:p_accountnumber, :p_comment)

create or replace
procedure TestCursor(

p_propertyid in contracts.mpropertyid%TYPE,
p_accountnumber out contracts.maccountnumber%TYPE,
p_comment out contracts.mcomment%TYPE

) AS
v_contractrec contracts%rowtype;
Cursor c_contracts is
SELECT mpropertyid, maccountnumber, mcomment   FROM contracts
 WHERE contracts.mpropertyid = p_propertyid;

begin
open c_contracts;
for v_contractRec in c_contracts loop
fetch c_contracts into v_contractrec;
exit when c_contracts%notfound;

    p_accountnumber := v_contractRec.Maccountnumber;     p_comment := v_contractRec.Mcomment; end loop;
close c_contracts;   

end TestCursor;

SQL> exec trmjc.testcursor(703233004,:p_accountnumber, :p_comment)

begin trmjc.testcursor(703233004,:p_accountnumber, :p_comment); end;

ORA-01008: not all variables bound Received on Fri Nov 05 2004 - 11:04:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US