7.0 SVN MySQL calculated field content is returned as ??

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
bobo
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 20.05.2011, 03:19

7.0 SVN MySQL calculated field content is returned as ??

Post by bobo »

The following SQL statement executed on a MySQL 5.x table with TZQuery

Code: Select all

SELECT DATE_FORMAT( CTime, '%Y/%m/%d' ) AS FClicked, count( * ) AS Cnt
FROM TableName
GROUP BY FClicked
ORDER BY FClicked
the field value of the result set field "FClicked" always returns '??' instead of the date values (the query is executed properly and the records are returned properly).
This works with 6.6.6 stable, but not with the SVN version of 7.0 alpha.

Tried with
Fields[0].AsString
FieldByName('FClicked').AsString
FieldByName('FClicked').AsDateTime (gives exception of course, since '??' is not a valid date)

Tested on Win32 and Linux32 .
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

Maybe

SELECT DATE_FORMAT( NOW() , '%Y/%m/%d' ) AS FClicked, count( * ) AS Cnt
FROM TableName
GROUP BY FClicked
ORDER BY FClicked

because CTime is Microsoft SQL Server function
bobo
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 20.05.2011, 03:19

Post by bobo »

I just replaced the real field names I have in my example, so that is not the problem.
Plus, as I've mentioned I use MySQL server.
And, as I've mentioned it works properly with 6.6.6 stable.
ism
Zeos Test Team
Zeos Test Team
Posts: 202
Joined: 02.10.2010, 20:48

Post by ism »

Lazarus 1.0.8 fpc 2.6.0
bobo
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: 20.05.2011, 03:19

Post by bobo »

Yes, this fixes it. Thanks.
Locked