Oracle:算术运算导致溢出

时间:2013-02-25 21:33:02

标签: c# .net oracle

我的查询提取两个字符串 - 根本没有数字类型,但Oracle客户端给我上面的例外。有什么想法吗?

这是查询 - 所有字段都是字符串:

 SELECT project_name 
        , project_title
        , project_name as Job2   
        , project_name as Job1  
 FROM PROJ

以下是例外:

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

2 个答案:

答案 0 :(得分:6)

现在拍摄我记得我之前见过这个。 Oracle客户端仅为32位。所以我的.NET应用程序需要进行x86编译。很烦人!这条消息是如此具有欺骗性。

答案 1 :(得分:4)

http://blogs.msdn.com/b/mariae/archive/2012/07/05/quot-arithmetic-operation-resulted-in-an-overflow-quot-error-running-a-report-that-uses-a-connection-data-source-to-oracle-10.aspx

Oracle ODBC驱动程序中的错误。它影响版本:Oracle的10.2.0.4到11.2.0.1以及只有64位驱动程序(不是32位驱动程序)。