Forum > Database

Postgres Currency (numeric(8,2)) type and DBGrid

(1/1)

unixux:
Hello,

This is my first post here, so please accept my apology if this has been asked before. I wasn't able to find an answer thus far.

I have a query from a Postgres 9.5 database returning some currency fields. DBGrid insists on displaying them shifted by four decimal places, that is when data has $0.08 DBGrid shows $800.00 . I have tried almost everything in Field definitions and column definitions on both the Query object and the Grid, but to no avail.

Is this intended behavior and if so how can I set it up to display correctly, or is this a bug and I need to fix it or get some kludge to make it work?

Client Platform : Lazarus 1.6.0 on Windows 10 64-bit
DB Platform : Postgres 9.5 on Solaris x86 11.3

Thank you,
unixux.

LacaK:
If you are using FPC 3.0 then it is known "currency bug". It is already fixed in incomming FPC 3.0.2

Navigation

[0] Message Index

Go to full version