|
Abrar
User
Location:
Joined on: 13-Nov-2009 21:48:02
Posted: 26 posts
|
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
Location: London by day, Milton Keynes by night.
Joined on: 08-Oct-2008 17:55:47
Posted: 1461 posts
|
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
LLBLGen Pro Team
Location: The Hague, The Netherlands
Joined on: 17-Aug-2003 18:00:36
Posted: 37082 posts
|
Please look into overriding DataAccessAdapterBase.HandleValueReadErrors. Please check the runtime lib reference manual for details on this method.
|
|
|
Abrar
User
Location:
Joined on: 13-Nov-2009 21:48:02
Posted: 26 posts
|
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
Support Team
Location:
Joined on: 21-Aug-2005 16:03:48
Posted: 14389 posts
|
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?
Quote: |
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
Location:
Joined on: 13-Nov-2009 21:48:02
Posted: 26 posts
|
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?
Quote: |
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? |
|
|
|
|