Page 1 of 1

After zeos7.3 last update. Is not valid date format

Posted: 24.08.2020, 08:15
by ash71
Hello All.
Latest Lazarus Win32. freetds, msql

After the last update of zeos, my project crashes with message … "06/01/2020" is not valid date format ?!
-->> Do note that 06 is the MONTH and 01 is the DAY of my date

function TdmAPPRdbModule.DB_QueryCurMonthValues(fReSync:Boolean=false): Variant;
var d1, d2: TDateTime;
begin
With tbCurMonth_ do
begin
d1 := FieldByName('CurMonthFDD').AsDateTime; // - is not valid date format ( msql table DATE column )
d2 := FieldByName('CurMonthLDD').AsDateTime;


...

Re: After zeos7.3 last update. Is not valid date format

Posted: 24.08.2020, 08:25
by marsupilami
Hello ash71,

I created a ticket on the tracker. See: https://sourceforge.net/p/zeoslib/tickets/438/

I will try to keep this thread updated but follow up discussion might happen over there.

Best regards,

Jan

Re: After zeos7.3 last update. Is not valid date format

Posted: 10.09.2020, 07:30
by EgonHugeist
Hello ash71,
what's the dateformat of your Server and which dateformat is used in the FormatSettings. Could you attach the stack-trace please?

Re: After zeos7.3 last update. Is not valid date format

Posted: 10.09.2020, 16:55
by marsupilami
Hello ash71,

could you tro to create a minimum working example? Meaning code for a program and a create script for the database?

Best regards,

Jan

Re: After zeos7.3 last update. Is not valid date format

Posted: 12.09.2020, 18:10
by ash71
Hello
It seems that the problem has already been solved :)
The database column was of type DATE. And DisabledZFields was TRUE.

Re: After zeos7.3 last update. Is not valid date format

Posted: 14.09.2020, 14:34
by marsupilami
ash71 wrote: 12.09.2020, 18:10 Hello
It seems that the problem has already been solved :)
The database column was of type DATE. And DisabledZFields was TRUE.
Erm - this still is a bug in Zeos, I think. Zeos also should work with native TDateFields. I would like to find that bug. Could you please try to create an example piece of code?

Best regards,

Jan

Re: After zeos7.3 last update. Is not valid date format

Posted: 14.09.2020, 18:49
by ash71
Yes. The problem persist. it seems i get around it with SQL CAST to DATETIME.
I attached the example here. sybdb.dll is needed to run this example.
No matter what is the state of DisableZFields

Re: After zeos7.3 last update. Is not valid date format

Posted: 14.09.2020, 22:31
by marsupilami
ash71 wrote: 14.09.2020, 18:49 Yes. The problem persist. it seems i get around it with SQL CAST to DATETIME.
I attached the example here. sybdb.dll is needed to run this example.
No matter what is the state of DisableZFields
I am sorry, your example didn't make it into the forums. Can you upload it somewhere?