Oracle Parameter goes missing

G

Guest

I have stored proc that takes 5 parameters and works fine when called from within one class, in another class i ge
"ORA-06550: line 1, column 7
PLS-00306: wrong number or types of arguments in call to 'GETPEOPLE
ORA-06550: line 1, column 7
PL/SQL: Statement ignored
when looking with QuickWatch at the Command object its Parameters collection has all the parameters set up correctly BU
StatementText for the Command object is:
StatementText "begin PDCProcedures.GetPeople(p_LinkPersonID=>:p_LinkPersonID, p_PersonID=>:p_PersonID, p_Result=>:p_Result, p_ErrorMessage=>:p_ErrorMessage); end;" Strin

ie it only has 4 parameters rather than 5, the middle one is missing

Microsoft Oracle DataProvider, VB.NET 2002, Win2K, Oracle Server V8.174, Oracle Client 9.2.0.1.
any ideas

gu
 
D

David Browne

guy said:
I have stored proc that takes 5 parameters and works fine when called
from within one class, in another class i get
"ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GETPEOPLE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored"
when looking with QuickWatch at the Command object its Parameters
collection has all the parameters set up correctly BUT
StatementText for the Command object is:-
StatementText "begin
PDCProcedures.GetPeople(p_LinkPersonID=>:p_LinkPersonID,
p_PersonID=>:p_PersonID, p_Result=>:p_Result,
p_ErrorMessage=>:p_ErrorMessage); end;" String
ie it only has 4 parameters rather than 5, the middle one is missing!

Microsoft Oracle DataProvider, VB.NET 2002, Win2K, Oracle Server V8.174, Oracle Client 9.2.0.1.0
any ideas?

No. But I know how you can fix it.

Just don't use CommandType.StoredProcedure. Use CommandType.Text and set
the command's text to the correct PL/SQL block to invoke the procedure.

EG

@"
begin
PDCProcedures.GetPeople(p_LinkPersonID=>:p_LinkPersonID,
p_PersonID=>:p_PersonID,
p_Whatever=>:p_Whatever,
Result=>:p_Result,
p_ErrorMessage=>:p_ErrorMessage);
end;
"

Then bind your parameters.

David
 

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

Top