Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 656987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:46:27+00:00 2026-05-13T22:46:27+00:00

I know there are several threads and posts regarding this issue in the internet

  • 0

I know there are several threads and posts regarding this issue in the internet and I’ve read them (not every article, I have to admit) but none of them did fully satisfy me.

My situation:
I’m using ODP.net (dll version 2.111.6.0) to access the Oracle DB (version 10 + 11) and a DataReader to retrieve the data (.NET 3.5, C#).

Using this code results in a ‘System.OverflowException (Arithmetic operation resulted in an overflow.)‘


decimal.TryParse(oraReader.GetOracleDecimal(0).Value.ToString(), 
  NumberStyles.Any, null, out parsedOraDecimal)

and this one results in a value of ‘3,000000000000000000000000000000000000000000000000000000000E-126‘


decimal.TryParse(oraReader.GetOracleValue(0).ToString(), 
  NumberStyles.Any, null, out parsedOraDecimal)

Now I have to find some way to retrieve and evaluate this value properly – the DB is also used from other apps which are out of my control so changes there are not possible.

Converting the types in my C# code from ‘decimal’ to ‘double’ is also not really an option.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:46:27+00:00Added an answer on May 13, 2026 at 10:46 pm

    I just had a similar issue, and tried the approach of changing the OracleDataAdapter to return Oracle specific types ( data_adapter.ReturnProviderSpecificTypes = true; ), but this is just a PITA, you end up casting OracleStrings back to strings, etc.

    In the end I solved it by doing the precision rounding in the SQL statement using Oracle’s round function:

    SELECT round( myfield, 18 ) FROM mytable
    

    Dotnet will then happily convert the figure to a decimal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that there are several threads posted about this issue, however I believe
I know there are several threads on this already, but I've hit a brick
I know there is several threads on this topic. I see a lot of
I know there are several threads asking similar questions - but I havent found
All right, do not get angry now, I know there are several questions about
I have several questions regarding Python threads. Is a Python thread a Python or
I have several threads running and I know currently one or many threads are
I know there are several questions about satellite Assembly's out there, but I still
I know there are several libraries to connect to XMPP servers, but is there
i know there are several questions about regex recursion in .net. I can write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.