[fpc-pascal] another pqconnection patch

Joao Morais post at joaomorais.com.br
Wed May 28 23:33:41 CEST 2008


Hello,

the following patch fixes the storage of floating point numbers where =

the decimal point isn't a dot.

Joao Morais

-------------- next part --------------
Index: packages/fcl-db/src/sqldb/postgres/pqconnection.pp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- packages/fcl-db/src/sqldb/postgres/pqconnection.pp	(revision 11085)
+++ packages/fcl-db/src/sqldb/postgres/pqconnection.pp	(working copy)
@@ -568,6 +568,8 @@
           case AParams[i].DataType of
             ftdatetime : s :=3D formatdatetime('YYYY-MM-DD',AParams[i].AsD=
ateTime);
             ftdate     : s :=3D formatdatetime('YYYY-MM-DD',AParams[i].AsD=
ateTime);
+            ftFloat,
+            ftCurrency : str(AParams[i].AsFloat, s);
           else
             s :=3D AParams[i].asstring;
           end; {case}


More information about the fpc-pascal mailing list