Page 1 of 1

Problem with Zeos field type Time

Posted: 22.09.2013, 19:12
by elidorio2
Good afternoon
I'm having trouble with time using field (Postgresql + 9.2.4 Lazarus 1.0.12 + Zeos Rev. 2743. In the example in annex I tested with Zeos components and Sqldb.
The data recorded by the time field is recorded in sqldb correctly and with zeos these values are written wrong and with value (00:00) in the type field.
Please make osteste as shown in the annex.
Any questions I am available.
Thank you

Edson

Re: Problem with Zeos field type Time

Posted: 25.09.2013, 19:53
by EgonHugeist
I'll check your example tonight and reply again if i know what's wrong.

Re: Problem with Zeos field type Time

Posted: 26.09.2013, 09:37
by EgonHugeist
Did test your example. What must i do to see what you mean?

Attached a picture of your running app..

Re: Problem with Zeos field type Time

Posted: 26.09.2013, 12:15
by elidorio2
Hello Michel,
See the data recorded on the SQLdb and Zeos, the field team appears with the value (0:00:00) which was recorded by Zeos. Image below and follow the enclosed sql script.

Re: Problem with Zeos field type Time

Posted: 27.09.2013, 11:32
by elidorio2
Hello Michael,

The structure of your table that you created that is similar to that?
The problem I see is with the type field (Time).



CREATE TABLE public.teste (
cd_ordem serial NOT NULL,
cd_funcio numeric(5,0) NOT NULL,
dt_ordem date NOT NULL,
hra_ini time without time zone NOT NULL,
hra_fim time without time zone NOT NULL,
tipo_acesso char(20)
)
WITH (oids = false);

Re: Problem with Zeos field type Time

Posted: 27.09.2013, 19:21
by EgonHugeist
Hmpf i still can not find out what you mean, Edson.

No idea which issue you want to point me. Attached your app with you create and populate script. Did play with the time values.

Hmm may i ask for the FPC and LCL you're using? I remebere there was a FPC bug with time values. We've an define in Zeos.inc for that.

Re: Problem with Zeos field type Time

Posted: 27.09.2013, 21:02
by elidorio2
I'm using 2.6.2 FPC. strange that the SqlDB, writes correct the values.

Re: Problem with Zeos field type Time

Posted: 27.09.2013, 21:39
by EgonHugeist
Why strange? I can NOT see any differences between Zeos and SQLDB of FPC2.7.1. Now i'll test it on FPC2.6 Win32 or do you use another compile target?

Re: Problem with Zeos field type Time

Posted: 27.09.2013, 22:32
by EgonHugeist
Got it. Patch done R2761 \testing-7.1

It's the same FPC Bug again. The SQLDB component using the TBufdataset and Zeos uses the TDataSet.

Added a define:
{$IFDEF FPC_FULLVERSION>20601}
{$UNDEF WITH_FPC_FTTIME_BUG}
{$ENDIF}
To ZeosLazarus.inc.

Re: Problem with Zeos field type Time [resolved]

Posted: 28.09.2013, 02:13
by elidorio2
Thank you Michael,

problem Solved

Re: Problem with Zeos field type Time

Posted: 29.09.2013, 16:21
by elidorio2
Hello Michael,

This Bug was reported to the FPC Team of FPC?

see if it's the same problem on the link below:

http://bugs.freepascal.org/view.php?id=22371