Recent

Author Topic: Decimal issue in DBGrid with 32bit version  (Read 972 times)

tcsorgo

  • Newbie
  • Posts: 5
Decimal issue in DBGrid with 32bit version
« on: April 20, 2018, 03:42:33 pm »
Hi,

I have written an application in Lazarus 1.8.2 (FPC:3.0.4) 64bit with SQLite database (3.23.1), which works well but if I compile this with Lazarus 1.8.2 32bit, than a strange thing happens with decimals in the DBGrid.
In 32bit version DBGrids show the floating numbers with a lot of decimals, although the same data in 64bit version and in the database has just a few decimals. See attached.
 
Do you have any idea why this happens or what I should check?

Thanks!

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Decimal issue in DBGrid with 32bit version
« Reply #1 on: April 20, 2018, 03:45:56 pm »
play with the displayformat of the field, this should give you full control over number of decimal points.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

tcsorgo

  • Newbie
  • Posts: 5
Re: Decimal issue in DBGrid with 32bit version
« Reply #2 on: April 20, 2018, 05:43:07 pm »
thanks, it works!
Set to "0.####", numbers are shown correctly with both systems.

 

TinyPortal © 2005-2018