Subject RE: [IBO] Solution: Problem in TIB_Query and currency...
Author Claudio Valderrama C.
Very sensible approach, Jocelyn. Precision is all the number, not the
SqlScale as you discovered.
Result := FloatToStrF( AsExtended,
18 {-SQLScale},
CurrencyDecimals )

In this case, SqlScale sounds more appropriate in place of
CurrencyDecimals, but it might be a disaster, not sure.
Beware that this limit of 18 places may produce weird results in the
neighborhood of INT64's top values that go up to 9E18. Maybe Geoff remembers
the convoluted function I wrote to deal with this problem. See
function CompToStr(n: comp): String;
in IBA_Column.IMP if this gives you an idea.


> -----Original Message-----
> From: jocelyndionne@... [mailto:jocelyndionne@...]
> Sent: MiƩrcoles 7 de Febrero de 2001 2:29
> Why does this return something strange instead of a currency? If I
> look in the help, it says that the third parm is the precision. You
> use SQLScale. I think it's the problem. The help says that for an
> extended variable, we can use 18 or less. So I changed the third
> parameter to 18, given the fact that you use AsExtended in the first
> parameter. And it works...