OracleCommandBuilder.DeriveParameters doesn't return parameters every time
Hello,
I use Microsoft's Oracle client provider.
I have 2 Oracle stored procedures that do the same thing and have only different names:
SP1:
create or replace procedure GetScalar(last_name IN PERSON.LastName%TYPE, row_count OUT INTEGER)
as
begin
SELECT COUNT(*) INTO row_count FROM PERSON
WHERE LASTNAME = last_name;
end GetScalar;
SP2:
create or replace procedure Get_Bool(last_name IN PERSON.LastName%TYPE, r_count OUT INTEGER)
as
begin
SELECT COUNT(*) INTO r_count FROM PERSON
WHERE LASTNAME = last_name;
end Get_Bool;
I use the same C# code for both.
When I use stored procedure SP1 after this code was called:
OracleCommandBuilder.DeriveParameters(objCmd);
int n = objCmd.Parameters.Count;
n is 2, which is ok.
But, when I use stored procedure SP2:
n is 0, which is not ok.
What should I do yo make it work?
When I call both store procedures inside Oracle enviroment both work fine.