Subject Re: [IBO] Float truncation
Author Luiz Alves
> I want to limit the field to 2 digits after the decimal point.
> How do I do this ?
Use a mask to limit it. Tib_query has a property to do it.
Another option is to use Enh Comp from Geoff.

> Can I limit the number of digits after the decimal point in the
> database itself ?

Use field definition as numeric(x,2) where 2<=x<=18 if usig IB 6.0.

Luiz
""Leeway"" <lee@...> escreveu na mensagem
news:9kgv2c+oegj@......
> I have a floating point field connected to a TIB_Edit
> I want to limit the field to 2 digits after the decimal point.
> How do I do this ?
> Can I limit the number of digits after the decimal point in the
> database itself ?
>
> I tried this
>
> QTIB_Art.FieldByName('EP_EXCL').AsFloat := StrToFloat(FloatToStrF
> (QTIB_Art.FieldByName('EP_EXCL').AsFloat,ffFixed,12,2));
>
> This does not work, is there a way to use a mask or what can I do ?
>
> Lee
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>