[fpc-devel] MySQL 5.1 and Double (trouble)

Ludo Brands ludo.brands at free.fr
Mon Jul 11 15:47:57 CEST 2011


> > How do you get the 40734.825668912003 value?
> 
> Fields.FieldByName(Value).AsFloat();

Floattostr limits precision to 15 digits (40734.8256689120). When updating
the mysql database it converts the float to a string and looses the last 2
digits. The last digits are returned by gdb or the str procedure with
precision >15, but won't be displayed in data controls. 

Ludo




More information about the fpc-devel mailing list