Page 1 of 1

Wring data to SQL SERVER decimal data type incorrect

Posted: Tue 10 Sep 2019 12:32
by a29237876
A data field in SQL SERVER declare as decimal(9,2)
use UniLoader write data to SQL SERVER

when some data value, which is 0.05 store on some delphi variable which is declare as double data type, the data write to SQL SERVER become some 0.04 and some 0,05, the 0.04 is incorrect
If I use const value 0.05 in uniLoader, No problem, data write to SQL Server is always 0.05
If I change SQL SERVER data field as decimal(9,3), then some value is 0.049

if change data type to smallmoney, then no problem.

is this bug?

SQL SERVER 2017, Delphi 2007, UniDac 8

Re: Wring data to SQL SERVER decimal data type incorrect

Posted: Tue 10 Sep 2019 16:55
by FCS
Hello,

It could be releated to the Delphi Round function.

Regards
Michal

Re: Wring data to SQL SERVER decimal data type incorrect

Posted: Thu 12 Sep 2019 11:04
by Stellar
Unfortunately, we can't reproduce the issue. To investigate this behavior of UniDAC, please compose a small sample demonstrating the issue and send it to us, including database objects creating scripts.
You can send the sample using the contact form at our site: devart.com/company/contactform.html