PLS-00306: wrong number or types of arguments in call

P

Pial

Hi:

I am facing the problem while entering data: I am using C# parameters
to PL/SQL functon.....

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to '....'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored


Thanks in Advance
Zahir
 
A

Alvin Bruney [MVP - ASP.NET]

have you checked your arguments to see if they are the correct type and
correct number? this is what the error message indicates

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
 
M

Manpreet Khurana

Hi Zahir,
It could be that you are binding the parameters of object refering
Stored Procedure without check whether parameter have already been
bounded to object or not. If parameter are already bounded then you
need to remove the existing binding before your new binding.

If you do not remove existing binding then you obviously will get the
error that "Wrong number of argument supplied" because if orginally
your procedure expects 2 parameter and you are rebinding the parameters
to command object then it will become 4 which indeed oracle will not
accept.

Hope this helps!

cheers!
Manpreet Khurana
 
M

Manpreet Khurana

Hi Zahir,
It could be that you are binding the parameters of object refering
Stored Procedure without check whether parameter have already been
bounded to object or not. If parameter are already bounded then you
need to remove the existing binding before your new binding.

If you do not remove existing binding then you obviously will get the
error that "Wrong number of argument supplied" because if orginally
your procedure expects 2 parameter and you are rebinding the parameters
to command object then it will become 4 which indeed oracle will not
accept.

Hope this helps!

cheers!
Manpreet Khurana
 
Joined
Aug 27, 2010
Messages
1
Reaction score
0
Specify the direction

I ran into the same error, and the parameter direction was my problem.

For this error:
1. Check that you have no typos in the parameter name

2. Check that the variable type is right

3. Specify the parameter direction properly.
I have been running stored procedures for a while without specifying the direction of the parameter IN, OUT, etc. until I ran accross this error with 1 particular stored procedure.
Also - if you specify the wrong direction for the parameter it will give you the same error. ("Wrong TYPE of argument" would apply under these circumstances)

mycommand.Parameters("inParametername").Direction = Data.ParameterDirection.Input
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top