Skip to Content

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

May 26, 2017 at 01:33 PM


avatar image


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


//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 That's six hours of my life I'll never get back :(

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

0 Answers