I have some code that is responsible for converting data from an IDataReader
into an IronPython.Runtime.List
of PythonTuples
. This same code is employed for several different kinds of database connections (including Access, Oracle and MySql).
Oracle's OracleDecimal
datatype causes an overflow when calling dataReader.GetValues()
when the cursor contains a value with a large precision. This issue has been well documented, and the solutions always involve using specific methods on the OracleDataAdapter
. I only have an IDataReader
interface.
Is there any way around this issue without binding my code specifically to ODP.NET? Surely there must be some way to get at this data in a provider-agnostic way?
The only provider agnostic method that I am aware of is to round the values in your select statement. I've found that rounding to 15 decimal places usually does the trick.