User-1825561198 posted
Question?
Problem:
We have values like “-5.6843418860808E-14“ saved in the database.
One of the services we have sends values w/ scientific notation to be inserted.
could there be a generic solution to fix the problem of values with scientific notation. A generic solution to be used in different projects.
I´m not sure if we should create a specific method to handle those situations, In my opinion the best solution is to use a MATH.ROUND. The decimal digits to use will be chosen based on the needs.
Replace the following code:
SSCustBal = this.ReadDoubleColumn(SSCustBalanceReader, “Balance00”);
WITH:
SSCustBal = Math.Round(this.ReadDoubleColumn(SSCustBalanceReader, “Balance00”),3);
Please let me know your suggestions?
Thank you