Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using SuppressGetDecimalInvalidCastException #60

Open
Shtong opened this issue Dec 7, 2022 · 0 comments
Open

Using SuppressGetDecimalInvalidCastException #60

Shtong opened this issue Dec 7, 2022 · 0 comments

Comments

@Shtong
Copy link

Shtong commented Dec 7, 2022

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant