Hi.
I've just experienced an overflow while dereferencing a DataReader. Apparently the value was too large for C# type Decimal. The column was a PostgreSQL numeric, and the value had infinitely repeating decimal places (it was something like 2/3).
I worked around this by using the round() function in the query, to specify the maximum number of decimal places. However, I'm wondering whether there's some neater way to do this.
I'm also wondering whether is it correct for the DataReader to throw an exception when encountering a value like this.
I'd be grateful for any insights!
Thanks,
Evan
Overflow from PostgreSQL numeric type
Thanks, Andrey.
I don't remember this clearly, but I did encounter something similar using the Oracle .NET provider. They might have even told us that the behaviour was correct!
Sorry to cause you grief, though in the end, an already-strong product will be even stronger. Best of luck with your work.
Regards,
Evan
I don't remember this clearly, but I did encounter something similar using the Oracle .NET provider. They might have even told us that the behaviour was correct!
Sorry to cause you grief, though in the end, an already-strong product will be even stronger. Best of luck with your work.
Regards,
Evan