Using SuppressGetDecimalInvalidCastException
Opened this issue · 0 comments
Shtong commented
Hi,
We are using Dapper.Oracle, and are sometimes getting InvalidCastException
errors when reading decimal values from Oracle, if these values contain too many decimals.
This is a known problem in the Oracle .NET driver. Oracle has provided a way to avoid it : the SuppressGetDecimalInvalidCastException property in the OracleDataReader
class that has to be set to true to round the numbers just enough so that they can be read by .NET. However, Dapper does not allow direct access to the data readers, and so we cannot set this property while using Dapper.
Would there be a way to do this with Dapper.Oracle ? Would it be possible to add such a feature ?