Op woensdag 28-05-2008 om 18:33 uur [tijdzone -0300], schreef Joao Morais: > the following patch fixes the storage of floating point numbers where > the decimal point isn't a dot.
Two questions: does postgres always request a dot as decimal point? And dos your code guarantee to use a dot as decimal point? Or is 'str' locale-dependent? Maybe better use FloatToStr with a given locale-setting? Joost > Index: packages/fcl-db/src/sqldb/postgres/pqconnection.pp > =================================================================== > --- 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 := > formatdatetime('YYYY-MM-DD',AParams[i].AsDateTime); > ftdate : s := > formatdatetime('YYYY-MM-DD',AParams[i].AsDateTime); > + ftFloat, > + ftCurrency : str(AParams[i].AsFloat, s); > else > s := AParams[i].asstring; > end; {case} _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal