Hello all,
On Lazarus v0.9.25 r16541 i386-win32-win32/win64, I have the following problem.
I access an SQLite3 database. There I have a column defined as numeric(3), it means, 3 whole number digits and no decimal places. The table has to be synchronised with PostgreSQL using the same table name and column names. Therefore the column definition is simply taken from the PostgreSQL definition.
The data is maybe stored correctly in the database but when I call the AsString property on that field, I don't get e. g. '14' as expected but '0,0014'.
I tried to track it down and I got somewhere into the FloatToStrIntl function which actually returns that worngly formatted number. The input parameter to that function (the number) seems to still have the correct value (14). So I suppose the problem's raised by that conversion function; still not sure, maybe the function isn't called well.
Here you have the critical part of the call stack:
#0 :1148
#1 FLOATTOSTRF(14, FFGENERAL, -1, 0, {CURRENCYFORMAT = 3, NEGCURRFORMAT = 8, THOUSANDSEPARATOR = 160 #160, DECIMALSEPARATOR = 44 ',', CURRENCYDECIMALS = 2, DATESEPARATOR = 46 '.', TIMESEPARATOR = 58 ':', LISTSEPARATOR = 44 ',', CURRENCYSTRING = 0x656a0 'K'#232, SHORTDATEFORMAT = 0x6d870 'd.M.yyyy', LONGDATEFORMAT = 0x6d890 'd. MMMM yyyy', TIMEAMSTRING = 0x6d8b0 'dop.', TIMEPMSTRING = 0x6d8d0 'odp.', SHORTTIMEFORMAT = 0x6d8f0 'h:nn', LONGTIMEFORMAT = 0x6d910 'h:nn:ss', SHORTMONTHNAMES = {0x65570 'I', 0x65580 'II', 0x65590 'III', 0x655a0 'IV', 0x655b0 'V', 0x655c0 'VI', 0x655d0 'VII', 0x6d6d0 'VIII', 0x655e0 'IX', 0x655f0 'X', 0x65600 'XI', 0x65610 'XII'}, LONGMONTHNAMES = {0x6d5f0 'leden', 0x6d610 #250'nor', 0x6d630 'b'#248'ezen', 0x6d650 'duben', 0x6d670 'kv'#236'ten', 0x6d690 #232'erven', 0x6d6b0 #232'ervenec', 0x6d6f0 'srpen', 0x6d710 'z'#225#248#237, 0x6d730 #248#237'jen', 0x6d750 'listopad', 0x6d770 'prosinec'}, SHORTDAYNAMES = {0x65620 'ne', 0x65630 'po', 0x65640 #250't', 0x65650 'st', 0x65660 #232't', 0x65670 'p'#225, 0x65680 'so'}, LONGDAYNAMES = {0x6d790 'ned'#236'le', 0x6d7b0 'pond'#236'l'#237, 0x6d7d0 #250'ter'#253, 0x6d7f0 'st'#248'eda', 0x6d810 #232'tvrtek', 0x6d830 'p'#225'tek', 0x6d850 'sobota'}, TWODIGITYEARCENTURYWINDOW = 50}) at sysstr.inc:1519 #2 FLOATTOSTRF(14, FFGENERAL, -1, 0) at sysstr.inc:1526 #3 CURRTOSTR(14) at sysstr.inc:1638
#4 :2218
Any help would be gladly appreciated :-)
Pavel ?ezn??ek
