SELECT returns wrong value

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
david66
Posts: 2
Joined: Thu 06 Jul 2006 14:28

SELECT returns wrong value

Post by david66 » Thu 06 Jul 2006 14:31

hello ,
i don't understand why this : select toto from table

if toto value is 0.00955882352941177 the query return this value : 9558823529.4

if toto value is 0.0110294117647059 the query return this value : 0.011029411765


i don't understand why ?


i using 4.30.1.15 mydac component and mysql 4.1 and delphi 7

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Thu 06 Jul 2006 20:40

are you using float fields ? , have you tried this with double fields type instead ?

david66
Posts: 2
Joined: Thu 06 Jul 2006 14:28

Post by david66 » Fri 07 Jul 2006 06:17

I m using Double Field

Zagawa
Posts: 21
Joined: Fri 12 May 2006 09:56

Post by Zagawa » Fri 07 Jul 2006 08:27

I have the same kind of problem with Delphi 5 and the lastest version of Mydac Component.

I tested it with MyODBC / BDE standard component and the result is correct.

With MyDac, for the same value in a float and in a Double field, result for float field is correct and it is not correct for double field.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 07 Jul 2006 14:22

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next MyDAC build. The next build of MyDAC will be available in the nearest few days.

Post Reply