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

Ludo Brands ludo.brands at free.fr
Tue Jul 12 13:19:06 CEST 2011


 

May be, that this can be fixed in sqldb.pp in function
TSQLConnection.GetAsSQLText(Param: TParam) : string; 
...
-    ftFloat    : Result := FloatToStr(Param.AsFloat, FSQLFormatSettings);
+    ftFloat    : Result := FloatToStrF(extended(Param.AsFloat), ffGeneral,
16, 0, FSQLFormatSettings); 
...
for me it seems, that works ... See atached program.
What do you think ?
-Laco.

 

But that won't solve the writing of truncated data as long as doubles are
passed as a string to mysql.
 
Ludo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110712/1222d46d/attachment.html>


More information about the fpc-devel mailing list