OCI-22053: overflow error

Posts   
 
    
Abrar
User
Posts: 26
Joined: 13-Nov-2009
# Posted on: 02-Mar-2010 17:57:59   

LLBLGen Pro V2.5, VSTS 2009, .NET Framework 3.5 sp1, C#, Oracle 10g

Hi, When I try to fetch data from a Oracle view: adapter.FetchEntityCollection(blenderCollection, bucket, 0); I get an error.. Message: "OCI-22053:Overflow error" Source: "System.Date.OracleClient" Stack Trace: at System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleNumber.ToDecimal(OciErrorHandle errorHandle, Byte[] value) at System.Data.OracleClient.OracleColumn.GetDecimal(NativeBuffer_RowBuffer buffer) at System.Data.OracleClient.OracleColumn.GetValue(NativeBuffer_RowBuffer buffer) at System.Data.OracleClient.OracleDataReader.GetValues(Object[] values) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IEntityFields2 fieldsUsedForQuery) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn) at RMSYSBillingSvc.Common.ProcessTrades.getRMSYSTrades1() in C:\CNEProjects\RetailGasBilling\RMSYS Line Item Interface\Source\RMSYSBillingSvc\Common\ProcessTrades.cs:line 149

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 02-Mar-2010 21:26:00   

The error is being raised by the oracle client, not LLBLGen - can you confirm if you get the same error running the same query just thought ADO.NET, without using LLBLGen ?

Looks like you may have a value in an Oracle decimal field which is too large for a .NET decimal field - is this a possiblity ?

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 03-Mar-2010 11:00:22   

Please look into overriding DataAccessAdapterBase.HandleValueReadErrors. Please check the runtime lib reference manual for details on this method.

Frans Bouma | Lead developer LLBLGen Pro
Abrar
User
Posts: 26
Joined: 13-Nov-2009
# Posted on: 03-Mar-2010 14:33:39   

I tried it by your advise using ADO.NET and its working fine. I dont know why it is not working by using LLBLGen. It was working fine last week and it crashed suddenly. I dont know why. If it is a Oracle Decimal field problem then why it is working with ADO.NET?

Thanks, Abrar

MTrinder wrote:

The error is being raised by the oracle client, not LLBLGen - can you confirm if you get the same error running the same query just thought ADO.NET, without using LLBLGen ?

Looks like you may have a value in an Oracle decimal field which is too large for a .NET decimal field - is this a possiblity ?

Matt

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 03-Mar-2010 17:51:42   

OracleDataReader.GetValues tries to convert numeric values from OracleNumber to System.Decimal which has a smaller range and hence the risk of overflow.

Otis wrote:

Please look into overriding DataAccessAdapterBase.HandleValueReadErrors. Please check the runtime lib reference manual for details on this method.

Please try the above mentioned suggestion. btw, which ODP.NET version are you using?

If it is a Oracle Decimal field problem then why it is working with ADO.NET?

Were the numbers returned in a decimal .NET type?

Abrar
User
Posts: 26
Joined: 13-Nov-2009
# Posted on: 03-Mar-2010 23:06:55   

It is fixed. Actually Matt was right. We had a value in an Oracle decimal field which was too large and we fixed it by truncating it to 4, trun(#,4) and it worked.

Thanks Matt/Otis/Waala. I appreciate your help.

Walaa wrote:

OracleDataReader.GetValues tries to convert numeric values from OracleNumber to System.Decimal which has a smaller range and hence the risk of overflow.

Otis wrote:

Please look into overriding DataAccessAdapterBase.HandleValueReadErrors. Please check the runtime lib reference manual for details on this method.

Please try the above mentioned suggestion. btw, which ODP.NET version are you using?

If it is a Oracle Decimal field problem then why it is working with ADO.NET?

Were the numbers returned in a decimal .NET type?