Zeos 6.6.3 D2007 datetime Mysql 4.1.22

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
daniele
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 13.03.2009, 10:01

Zeos 6.6.3 D2007 datetime Mysql 4.1.22

Post by daniele »

Sorry for my english.
This problem cause me most difficulty.
I'have a table with field type declared DATE, TIME, DATETIME and read data with ZTable and ZQuery. If the value in field is 00:00:00 Zeos return Null, else if the value is 24:00:00 Zeos return 00:00:00 but is not the same.
If execute a sql like this and I've the result in two controls dbgrid and memo in combination with FormatDateTime() function:

INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','00:00:00','2009-01-01 00:00:00')

mtime return blanck and mdatetime return 01/01/2009 in dbgrid
mtime return null and mdatetime return null in memo

another:

INSERT INTO dbname (mdate,mtime,mdatetime) VALUES
('2009-01-01','24:00:00','2009-01-01 00:00:00')

mtime return 00:00:00 and mdatetime return 01/01/2009 in dbgrid (Time is blanck)
mtime return 00:00:00 and mdatetime return null in memo

I've try to use TDateTime class to store the valuse of mdatetime and the result of 2009-01-01 00:00:00 is 01/01/2009 00:00:00 but this method increase a lot the line of my code.

Help ...
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Maybe a stupid question, but would it be possible to write a small sample program showing us exactly what's wrong. That makes it easier for us to debug as well.
What do I expect from the packaged sample:
- The project is as easy as possible. 1 connection, one query, one datasource and some db components should be enough for this problem, I think. Maybe some buttons for utility work. All standard Delphi or Zeoslib components, if possible no external components.
- The minimally necesary files for building the exe file.
- The script to create the table and the inserted rows.

Maybe it's best to post this sample in the bug tracker as well. If nobody has time to test/debug this post immediately it will get lost unsolved in the forum.
You find the bugtracker at zeosbugs.firmos.at. Problem may be related to the bugs 169, 170 and 171.

Mark
Image
daniele
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 13.03.2009, 10:01

Post by daniele »

Okay shall write the demo according to specific requests and post in the bugtracker. Thank you.
Post Reply