Subject | Float Values and editing |
---|---|
Author | Dressel@AnnuityPeople.com |
Post date | 2003-12-16T19:21:30Z |
I am having a problem with what appears to be IB/FB fields and my
editors (DevExpress). When I set the value of a float field, the
editor no longer respects the decimal places I told it to have (e.g.
2) and it gets very long.
For example, if I set a field value to 50.3, I get 53.2999992370605
showing up in the editor.
I understand the problem with float fields their binary
representation in memory--that doesn't fix this.
Just to check things out I switched over to a dfferent (in-memory)
dataset and using the same values and field classes and everything
worked just fine.
I also switched the field to a DECIMAL(15,4) and this fixed it as
well.
But should I have to do that? Why have other dataset's/databases
worked fine with the same class structure?
Thanks
Ed Dressel
editors (DevExpress). When I set the value of a float field, the
editor no longer respects the decimal places I told it to have (e.g.
2) and it gets very long.
For example, if I set a field value to 50.3, I get 53.2999992370605
showing up in the editor.
I understand the problem with float fields their binary
representation in memory--that doesn't fix this.
Just to check things out I switched over to a dfferent (in-memory)
dataset and using the same values and field classes and everything
worked just fine.
I also switched the field to a DECIMAL(15,4) and this fixed it as
well.
But should I have to do that? Why have other dataset's/databases
worked fine with the same class structure?
Thanks
Ed Dressel