Subject Re: [ib-support] to change the decimal separator
Author Adam
--- In firebird-support@yahoogroups.com, "aandea_launch" <alin@...> wrote:
>
> Hello All,
>
> Is this still the case in Firebird 1.5, or in the latest release
> (still RC) or Firebird 2.0?

1.5 is the latest released version
2.0 is in testing (under RC4)

> Isn't there any way to signal an Embedded
> Firebird engine to use the OS locale when converting a string to an
> integer?
>
> I have currently the same issue: We have a Delphi application that
> is using FloatToStr function to create the Firebird SQL statement. The
> application works excellent in US, but when we deploy it to a German
> OS, all the decimal separators are not 'comma', thus the FB SQL
> becomes something along the lines of "Select ID from the EVENTS where
> VALUE < 23,223".

FloatToStr is a Delphi function not a Firebird function. If it doesn't
work properly with Regional settings, check out the Delphi support forums.

Why are you passing a fixed string SQL where a parameter should be used?

In delphi, it is something like:

qry.sql.text := 'Select ID from the EVENTS where VALUE < :somevalue';
qry.parambyname('somevalue').Value := MyFloatVariable;
qry.open;

Parameters mean that you are not worrying about formatting preferences
when dealing with data.

Adam