Description
openedon Feb 7, 2023
I am pulling data from an OSISoft PI Server using using their OLEDB connection. After doing an execute reader to get one Single value and then calling datareader[1].ToString() method i am getting different results in .Net 4.7 vs .Net 6 (.Net Core).
The value in .Net 4.7 is 198133.8 but in .Net 6 it is 198133.75. I was looking at the Floating-Point Parsing and Formatting improvements in .NET Core 3.0 and was thinking that might be the cause of my issue? Is there any way to configure the OLEDB connection / OLDEB to use the old formatter for floats / decimals ? I have other examples where the Single that is coming back also has two digits after the decimal and it is not rounding the .Net 4.7 value so I am not sure if there is an underlying value that I cannot see that would be causing the rounding.