ORA-22054下溢错误 [英] ORA-22054 Underflow Error

查看:402
本文介绍了ORA-22054下溢错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使我的存储过程在Oracle中运行,并遇到Underflow错误.我正在尝试从六个不同的表中删除相关信息.我可以在SQL Developer中单独运行delete语句,而不会出现错误.当我尝试从后面的C#代码运行该过程时,我得到了一个带有Underflow错误的异常返回.有什么建议吗?

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?

这是代码:

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;

推荐答案

在您可以从SQL Developer成功运行存储过程的假设下,我的猜测是您为输入参数i_prof_sk传递了错误的值,也许是就像您将C#浮点值传递给过程一样.如果那没有意义,请发布调用该过程的C#代码,包括参数设置.这里的一些C#技巧可能会告诉您什么是不正确的.我还添加了C#标记,以引起那些人之一的关注.

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.

这篇关于ORA-22054下溢错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆