I am almost convinced that the problem is not what i am seeing...this code works
if VSQLVar^.sqlscale = 0 then? i := AParams[ParNr].AsIntegerelse//i := Round(AParams[ParNr].AsCurrency * IntPower10(-VSQLVar^.sqlscale));
? i := Round(BCDToDouble(AParams[ParNr].AsFMTBCD) * IntPower10(-VSQLVar^.sqlscale));the reason i think that this is not a *real* fix, is that the TParam.asCurrency returns a Varriant and this raises the error, but TParam.AsFMTBCD returns a TFMTBCD Value converted from a variant! This *should* raise the same error, but it doesn't How could i have debug info in FMTBCD unit? i would like to take a look at this BCDFactory
PS : I am really trying to fix the problem and not just patch around it, i have the highest hope in your understanding and help :) Regards,Chris
On Sunday, November 9, 2014 12:08 PM, Joost van der Sluis wrote:
Chris Rempas wroteI copied the binaries that were missing in my FPC 2.7.1 from FPC2.6.4 i run make clean all and make install again and VOILA! i have debug! :))) (it seems all the binaries must be in the same directory for some reason)
I don't really understand which binaries you did copy. But I'm glad you have the debug-info.
Show quoted text 8 lines
For 'BCD' fields, the Currency type is used. In your case you have 5 decimals, so you can not use .AsCurrency...
Show quoted text 7 lines
Currency and BCD are the same. So apparently support for FMTBCD fields is missing here. As the FMTBCD support is relatively new this could just be missing.
I am guessing at this point that i don't have the latest code if i could have a copy of the latest component, i would be able to test and maybe help debug with real testing
2.7.1 is the latest version? Yo have to find out where/why the FMTBCD param is accesses as AsCurrency (Assign, GetData, SetData?), and fix that. Then you can simply recompile fcl-db and see if your program works.
Oh, and if you have fixed the problem, send us a patch. ;)
Joost.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141109/3f33e5e3/attachment.html>
