Board index » delphi » I'm Updating a Currency Value and it doesn't change

I'm Updating a Currency Value and it doesn't change

    I'm doing that using a TQuery. I use the common procedure:

    Edit;
    FieldByName('xxx').AsCurrency =Valor
    Post

    The problem is that I'm passing a value (902,02 for example) and it
is writing one cent less (902,01).

    I'm using DELPHI 3.1 and SQLServer 6.5. I've made a trace and saw
that the program is not doing a update. The only thing that appears is a
Select Count(*) ...

    Does anybody knows what fuzzy thing is happenning ?

    I'd be gratefull.

    Thanks

    Carlos Srgio
    Brasil

 

Re:I'm Updating a Currency Value and it doesn't change


There is a bug in Delphi 4 using currency fields where the values get
written inaccurately to the db.  This may happen on 3 as well, something to
watch for.

I hope they fixed the problem on Delphi 5.

Luis

NOS Informatica Ltda <n...@fortalnet.com.br> wrote in message
news:37CEF8E1.695AEC4D@fortalnet.com.br...

Quote

>     I'm doing that using a TQuery. I use the common procedure:

>     Edit;
>     FieldByName('xxx').AsCurrency =Valor
>     Post

>     The problem is that I'm passing a value (902,02 for example) and it
> is writing one cent less (902,01).

>     I'm using DELPHI 3.1 and SQLServer 6.5. I've made a trace and saw
> that the program is not doing a update. The only thing that appears is a
> Select Count(*) ...

>     Does anybody knows what fuzzy thing is happenning ?

>     I'd be gratefull.

>     Thanks

>     Carlos Srgio
>     Brasil

Other Threads