Skip to Content
0

ADO.Net lib - HanaDecimal doesn't correctly Implement IConvertible

May 26, 2017 at 01:33 PM

36

avatar image

Hi,

I'm using the ADO.Net library, and for queries that return decimals it returns objects of type HanaDecimal rather than the standard System.Decimal.

I need to pass DataReader objects to a 3rd party library, but it can't get the numbers out of a HanaDecimal as it doesn't correctly implement IConvertible.

Based on the below example, this looks like a bug to me. What is the best way to report this to get it fixed?

e.g. System.Decimal is fine, HanaDecimal is not

((IConvertible)(decimal)12.34).ToDouble(System.Globalization.CultureInfo.InvariantCulture)

//returns 12.34

((IConvertible)new HanaDecimal((decimal)12.34)).ToDouble(System.Globalization.CultureInfo.InvariantCulture)

//returns 0

10 |10000 characters needed characters left characters exceeded

I can confirm Colin's error report. Seen with version 1.0.120.0. That's six hours of my life I'll never get back :(

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers