title: Oracle number to C# decimal
body: <p>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.</p>
  
  <p>My situation:<br>
  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#).</p>
  
  <p>Using this code results in a '<i>System.OverflowException (Arithmetic operation resulted in an overflow.)</i>'</p>
  
  <pre><code>
  decimal.TryParse(oraReader.GetOracleDecimal(0).Value.ToString(), 
    NumberStyles.Any, null, out parsedOraDecimal)
  </code></pre>
  
  <p>and this one results in a value of '<i>3,000000000000000000000000000000000000000000000000000000000E-126</i>'</p>
  
  <pre><code>
  decimal.TryParse(oraReader.GetOracleValue(0).ToString(), 
    NumberStyles.Any, null, out parsedOraDecimal)
  </code></pre>
  
  <p>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.</p>
  
  <p>Converting the types in my C# code from 'decimal' to 'double' is also not really an option.</p>
  
  <p>Any ideas?</p>