|
Replies:
4
-
Pages:
1
-
Last Post:
Dec 30, 2005 7:06 AM
Last Post By: dvdaniels
|
|
|
Posts:
14
Registered:
02/11/04
|
|
|
|
Arithmetic operation resulted in an overflow
Posted:
Sep 16, 2005 6:42 AM
|
|
|
|
Hello everyone,
I have searched through this forum only to find many dead ends on this topic Currently we are trying to to populate a dataset and in most cases it works flawlessly. In the past couple of days, we have encountered an error from the latest odp.net that is putting a stranglehold on our efforts.
I have discussed this with the dbm an he assures me that the numbers in question are only a 14/4 precision but when we try to access it, we get this;
Error filling dataset
Arithmetic operation resulted in an overflow.
at Oracle.DataAccess.Types.DecimalConv.GetDecimal(IntPtr numCtx)
at Oracle.DataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.GetValues(Object[] values)
at System.Data.Common.SchemaMapping.LoadDataRow(Boolean clearDataValues, Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
This data is not that complex so I am wondering why odp.net is suddenly choking to death on this small value. It can physically populate the value so why can't it read it back?
Any help will be greatly appreciated.
|
|
|
Posts:
1
Registered:
09/19/05
|
|
|
|
Re: Arithmetic operation resulted in an overflow
Posted:
Sep 19, 2005 9:11 AM
in response to: dvdaniels
|
|
|
|
Hello,
I've strictly the same problem, and currently have no workarround.
I've also tried with IDataReader and got the following exception (french error message):
Erreur interne du fournisseur de données(-3000)
[OracleException: Erreur interne du fournisseur de données(-3000)]
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure) +523
Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) +2296
Oracle.DataAccess.Client.OracleCommand.ExecuteReader() +95
Nemo.WebApplication.perso.gseg.arithmeticoverflow.Page_Load(Object sender, EventArgs e) in ...\arithmeticoverflow.aspx.cs:41
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +713
Thanks for your support.
|
|
|
Posts:
75
Registered:
02/07/05
|
|
|
|
Re: Arithmetic operation resulted in an overflow
Posted:
Sep 19, 2005 12:08 PM
in response to: dvdaniels
|
|
|
|
Hi d.daniels. You could try using the Safe Type Mapping feature. See ODP.NET docs for more info.
|
|
|
Posts:
3
Registered:
10/02/01
|
|
|
|
Re: Arithmetic operation resulted in an overflow
Posted:
Dec 29, 2005 5:45 PM
in response to: dvdaniels
|
|
|
|
Daniel,
Today I have got the same error while trying to fill DataSet by using DataAdapter.Fill() method. Error message:
Arithmetic operation resulted in an overflow.
at Oracle.DataAccess.Types.DecimalConv.GetDecimal(IntPtr numCtx)
at Oracle.DataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.GetValues(Object[] values)
at System.Data.Common.SchemaMapping.LoadDataRow(Boolean clearDataValues, Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
I have search the Web and have come across your posting on Oracle. Looks like this is the same problem and I wanted to ask you if you have found the solution for this problem. Im a week from Production Deployment and this looks like will be a Good surprise in holiday time.
Happy Holiday.
Thanks,
Daniel
|
|
|
Posts:
14
Registered:
02/11/04
|
|
|
|
Re: Arithmetic operation resulted in an overflow
Posted:
Dec 30, 2005 7:03 AM
in response to: khrusha
|
|
|
|
We found that this is caused by a return value that has more places to the right of the decimal point than .NET can handle. We just truncated the offending return value down to a reasonable 14.4 decimal and all is well now. The original function return wound up being precision 24.14 even though I was told otherwise. Be careful of functions that return calculated values. They sometimes try to return a larger number than even ODP.NET can handle.
Hope this is some help.
Message was edited by:
d.daniels@smmj.com
|
|
|
|
Legend
|
|
Guru : 2500
- 1000000
pts
|
|
Expert : 1000
- 2499
pts
|
|
Pro : 500
- 999
pts
|
|
Journeyman : 200
- 499
pts
|
|
Newbie : 0
- 199
pts
|
|
Oracle ACE Director
|
|
Oracle ACE Member
|
|
Oracle Employee ACE
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|