tags:

views:

213

answers:

1

I am trying to get my stored procedure working in Oracle and am getting an Underflow error. I am trying to delete related information from six different tables. I can run the delete statements separately in SQL Developer without error. When I try and run the procedure from my C# codebehind I get an exception returned with the Underflow error. Any suggestions?

Here is the code:

Procedure DeleteProf(i_prof_sk IN NUMBER) IS
BEGIN
  delete from nt_fac where nt_per_sk in (select nt_per_sk from nt_per 
     where nt_prof_sk=i_prof_sk);

  delete from nt_per_fact where nt_per_sk in (select nt_per_sk from nt_per 
     where nt_prof_sk=i_prof_sk);

  delete from nt_per where nt_per_sk in (select nt_per_sk from nt_per 
     where nt_prof_sk=i_prof_sk);

  delete from nt_prof_case where nt_prof_sk=i_prof_sk;

  delete from nt_prof_fact where nt_prof_sk=i_prof_sk;

  delete from nt_prof where nt_prof_sk=i_prof_sk;
END;
+1  A: 

Under the assumption you can run the stored procedure successfully from SQL Developer, my guess would be that you are passing an incorrect value for the input parameter i_prof_sk, perhaps something like you're passing a C# float value to the procedure. If that doesn't make sense, please post the C# code calling the procedure, including the parameter setup. Some of the C# sharps around here can probably tell you what isn't right. I've also added the C# tag to perhaps get the attention of one of those folks.

DCookie
That was the problem. It's working now.
Theresa
Kewl. Glad to help.
DCookie