ODAC - 6.25.2.15 - ERROR WHEN USING CALCULATED TDATEFIELDS

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
usuarioincorrecto
Posts: 18
Joined: Thu 28 Jun 2007 12:43

ODAC - 6.25.2.15 - ERROR WHEN USING CALCULATED TDATEFIELDS

Post by usuarioincorrecto » Tue 20 May 2008 09:01

Hi;

We have seen that when using Calculated Fields in TOraQuery, and you assign a TDateTime to them, Delphi raises an error, and data becomes "crazy".
The field in the DataBase is TDate.
The calculated field in the TOraQuery is TDateField;

I send you an small application that demonstrates it.

Please, respond me as soon as possible.

Best Regards;

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 21 May 2008 07:56

You should create TDateTimeField calculated fields for both FechaTruncada and HoraTruncada. Then you can just copy field value:

Code: Select all

  qFechas.FieldByName('FechaTruncada').AsDateTime := qFechas.fieldbyname('Fecha').AsDateTime;
  qFechas.FieldByName('HoraTruncada').AsDateTime := qFechas.FieldByName('Fecha').AsDateTime;
Your calculated fields will display date or time portion of the value if you set its DisplayFormat property accordingly.

usuarioincorrecto
Posts: 18
Joined: Thu 28 Jun 2007 12:43

Possible solution...

Post by usuarioincorrecto » Wed 21 May 2008 10:04

Hi;

Thank you for your response.
We fixed the problem with this solution before you told it to me, but I wrote to the support team the error, because I think this is not the solution.
In many previous ODAC versions (also with the old ODAC 4.50.1.18) it worked ok... but not now.

We can change the fields type... but I think the "error" remains.

If this is the only "solution", we'll change it, but in my opinion, a correct formated TDateTime field, If the desired value is the Date, should be perfectly recognized by a TDate field.

Thank you.

Greetings.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 26 May 2008 08:25

We have fixed the problem with ftDate and ftTime fields. The fix will be included in the next build of ODAC.

usuarioincorrecto
Posts: 18
Joined: Thu 28 Jun 2007 12:43

Next build

Post by usuarioincorrecto » Tue 27 May 2008 11:34

Hi;

Thank you for your quick response and for the fix.

When will next build be released?

Thank you

Greetings

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 27 May 2008 11:43

We are planning to release new ODAC build in two weeks.

Post Reply