Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers