Bug report: Reading a date field returns gibberish
Moderators: gto, cipto_kh, EgonHugeist
Bug report: Reading a date field returns gibberish
I'm using Lazarus with the 13 Oct 05 release of Zeoslib. I'm using MySQL V4.0.x
If I read a date from a record it returns as gibberish. However if I write a date it is saved properly.
If I do manual SQL query I can see the date is stored properly but it shows up as gibberish for example 10-10-12583. If I do a manual SQL query after writing a date field I can see the date was stored properly.
Any ideas?
If I read a date from a record it returns as gibberish. However if I write a date it is saved properly.
If I do manual SQL query I can see the date is stored properly but it shows up as gibberish for example 10-10-12583. If I do a manual SQL query after writing a date field I can see the date was stored properly.
Any ideas?
One of the Lazarus developers reviewed this and here is what they had to say:
Can someone from the Zeos team please check this out?FPC uses internally the TDateTime type for date-fields. But Delphi versions lower then Delphi 5 uses another type.
The problem is probably that ZEOS doesn't recognize fpc as a delphi version which uses TDateTime, so it uses the older type. Maybe it's even hardcoded, since older versions of FPC used the same system as lower Delphi versions.
So I think it's a ZEOS-bug, which they can fix very easily. They have to use the same code as they use for Delphi 5 and up. And not the code for Delphi 4 and lower. Probably a simple ifdef should fix that.
I change the status to resolved, you can submit a bugreport to ZEOS, and close this bug if they got this solved, of post a note it this appears to be another problem. (btw: this is a fpc-issue, not a lazarus one)
I created a bug report about this issue on the SF site:
http://sourceforge.net/tracker/index.ph ... tid=415824
Does anyone have any ideas on how to fix this? It sounds like a real easy fix.
http://sourceforge.net/tracker/index.ph ... tid=415824
Does anyone have any ideas on how to fix this? It sounds like a real easy fix.
Lazarus+MSSQL
I have same problem in Lazarus+MSSQL Server 2000
Jirka
Jirka