Rounding issue: Servoy Number --> float4

This applies to PostgreSQL, but may affect other backend databases as well:

I have spent a few hours trying to work out why

“16666.67” in FileMaker 6 would display as
“16666.70” after importing into PostgreSQL 8.1.2

using the RawSQL plugin…

It all boils down to this:
When you create a numeric field from Servoy, Servoy adds a field of type float4 to the backend database. Float4 is not suitable for storing monetary values, as it does not have the required precision, the new field should be of type “numeric” instead.

See also http://forum.servoy.com/viewtopic.php?t=4910

The same result for SQL 2000 numeric in servoy translates to float.

Does your docs say anything about which data type to use for monetary values?

I just change the data type in the backend to Money or Numeric. If I had it to do over again, I would have created all my tables in the backend, you have many more options.

Its; nice being able to create directly form Servoy, but I find myself having to change data types frequently.