I am having a hard time getting around this issue.
I am working with a enterprise DB table that has a column called balance
which is a float
.
I am trying to insert a decimal
value into it. Now in c# I tried round the decimal to 2 places then inserting it into the column and it just does this.
56.4000015258789
when my value is 56.40
.
I am debugging just before my insert and it is rounded. I can't change the column . . .so how do I get around this?
I know it has something to do with how sql considers fractions.
I tried formatting the decimal to a string then parsing it to a float and that didn't work.