Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleCommandBuilder.DeriveParameters doesn't return parameters every time

810295Nov 3 2010
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2010
Added on Nov 3 2010
0 comments
1,220 views