Page 1 of 1

Zeos 6.6.3 D2007 datetime Mysql 4.1.22

Posted: 18.04.2009, 09:54
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 ...

Posted: 19.04.2009, 19:41
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

Posted: 20.04.2009, 07:47
by daniele
Okay shall write the demo according to specific requests and post in the bugtracker. Thank you.