Home » SQL & PL/SQL » SQL & PL/SQL » procedure with defautl parameter values error!!!!!
procedure with defautl parameter values error!!!!! [message #230976] Fri, 13 April 2007 10:51 Go to next message
cefb
Messages: 56
Registered: March 2007
Member
hi there.

i have a procedure with two in parameters with default values, in sql*plus i can't call the procedure without giving values for my attributes. if i just call the procedure wihtout parameters i get an error.

thanks



Re: procedure with defautl parameter values error!!!!! [message #230977 is a reply to message #230976] Fri, 13 April 2007 10:55 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post your procedure prototype and what you executed.

Regards
Michel
Re: procedure with defautl parameter values error!!!!! [message #230981 is a reply to message #230976] Fri, 13 April 2007 11:05 Go to previous messageGo to next message
cefb
Messages: 56
Registered: March 2007
Member
create or replace procedure teste 
(x in varchar2 :=null,xx in number :=0,my_cursor out sys_refcursor)


and to call this procedure i executed

var c refcursor;
exec teste(:c);
print c;


and get this error

PLS-00306:wrong number or wrong arguments type

Re: procedure with defautl parameter values error!!!!! [message #230986 is a reply to message #230981] Fri, 13 April 2007 11:19 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First parameter is varchar2 and you give a refcursor, this is the error.
Either put your refcursor as first parameter or use
exec teste(my_cursor=>:c);

Regards
Michel

Re: procedure with defautl parameter values error!!!!! [message #230989 is a reply to message #230976] Fri, 13 April 2007 11:27 Go to previous messageGo to next message
cefb
Messages: 56
Registered: March 2007
Member
i changed the cursor to first parameter and worked fined.

can i make you one more question? Neutral

now i am trying to call this procedure from an asp and i am getting error because i dont give any parameters. i am using ado objects so i dont need to pass the cursor. so i am just doing
con.Execute("teste")
.


thanks for your time and patience
Re: procedure with defautl parameter values error!!!!! [message #230990 is a reply to message #230989] Fri, 13 April 2007 11:36 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Sorry I don't know asp.

Regards
Michel
Re: procedure with defautl parameter values error!!!!! [message #230991 is a reply to message #230976] Fri, 13 April 2007 11:40 Go to previous message
cefb
Messages: 56
Registered: March 2007
Member
thanks any way
Previous Topic: Sql doubt
Next Topic: compare two (merged)
Goto Forum:
  


Current Time: Wed Dec 07 11:01:36 CST 2016

Total time taken to generate the page: 0.06592 seconds