* * *

Author Topic: Postgres Currency (numeric(8,2)) type and DBGrid  (Read 1416 times)

unixux

  • Newbie
  • Posts: 2
Postgres Currency (numeric(8,2)) type and DBGrid
« on: June 16, 2016, 09:52:26 pm »
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

  • Hero Member
  • *****
  • Posts: 551
Re: Postgres Currency (numeric(8,2)) type and DBGrid
« Reply #1 on: October 15, 2016, 06:30:22 pm »
If you are using FPC 3.0 then it is known "currency bug". It is already fixed in incomming FPC 3.0.2

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus