oracle ORA-01426: 执行存储过程时数值溢出异常
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/351339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ORA-01426: numeric overflow exception when executing stored procedure
提问by user9977
I ported a Delphi 6 application to Delphi 2007 and it uses BDE to connect to an Oracle 9i database. I am getting an
我将 Delphi 6 应用程序移植到 Delphi 2007,它使用 BDE 连接到 Oracle 9i 数据库。我得到一个
ORA-01426: numeric overflow exception
ORA-01426: 数值溢出异常
When I execute a stored procedure. This happens randomly and if I re-run the stored procedure through the application with the same parameters the exception does not occur.
当我执行存储过程时。这是随机发生的,如果我通过具有相同参数的应用程序重新运行存储过程,则不会发生异常。
The old Delphi 6 application works just fine.
旧的 Delphi 6 应用程序运行良好。
Ideas anybody?
想法有人吗?
回答by Argalatyr
Showing a code example could make this easier, but here are a couple of hunches:
显示代码示例可以使这更容易,但这里有一些预感:
Are the data coming from another source (like Excel) that does not have explicit data types? Mixed or ambiguous data may be causing BDE to assign the wrong data type to a field that then is incompatible with the database field.
Could be a numeric formatting issue (some U.S.-centric components do not handle localization properly). Is your localization other than English(U.S.)? Is so, does changing it to English(U.S.) fix the problem?
数据是否来自没有明确数据类型的另一个来源(如 Excel)?混合或不明确的数据可能会导致 BDE 将错误的数据类型分配给与数据库字段不兼容的字段。
可能是数字格式问题(一些以美国为中心的组件无法正确处理本地化)。您的本地化不是英语(美国)吗?是这样,将其更改为英语(美国)可以解决问题吗?
If these completely miss, more details might help.
如果这些完全错过,更多细节可能会有所帮助。
回答by Argalatyr
Does the D6 version of the app use the same version of BDE, Oracle, and the database? If so, then it's probably something about the data being passed (either content or mechanism).
D6版本的app使用的是同一个版本的BDE、Oracle、数据库吗?如果是这样,那么它可能与正在传递的数据(内容或机制)有关。
Not knowing what those data are, nor how they are passed, makes it pretty hard to diagnose.
不知道这些数据是什么,也不知道它们是如何传递的,这使得诊断变得非常困难。