Oracle:算术运算导致溢出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15076900/
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
Oracle: Arithmetic operation resulted in an overflow
提问by Daniel Williams
My query pulls two strings - no numeric types at all, yet the Oracle client gives me the exception above. Any ideas?
我的查询提取了两个字符串 - 根本没有数字类型,但 Oracle 客户端给了我上面的例外。有任何想法吗?
Here is the query - all fields are strings:
这是查询 - 所有字段都是字符串:
SELECT project_name
, project_title
, project_name as Job2
, project_name as Job1
FROM PROJ
Here is the exception:
这是例外:
System.OverflowException: Arithmetic operation resulted in an overflow.
at System.Data.Odbc.OdbcDataReader.FirstResult()
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Partners.Core.Data.Database.FillDataSet(DataSet& dataSet, IDbCommand command, String[] tableNames) in c:\Dropbox\svn\partners\libraries\internal\Partners.Core\Data\Database.cs:line 999
回答by Daniel Williams
Shoot now I recall that I have seen this before. The Oracle client is 32-bit only. And so my .NET app needs to be x86 compiled. So annoying! And the message is so deceptive.
现在拍摄我记得我以前见过这个。Oracle 客户端仅为 32 位。所以我的 .NET 应用程序需要进行 x86 编译。很烦人!而且这个消息太具有欺骗性了。
回答by Arlene
bug in the Oracle ODBC driver. It affects the versions: 10.2.0.4 to 11.2.0.1 of Oracle and only the 64 bit driver (not the 32 bit driver).
Oracle ODBC 驱动程序中的错误。它影响版本:Oracle 的 10.2.0.4 到 11.2.0.1 和仅 64 位驱动程序(不是 32 位驱动程序)。