Page 1 of 1

ODAC - 6.25.2.15 - ERROR WHEN USING CALCULATED TDATEFIELDS

Posted: Tue 20 May 2008 09:01
by usuarioincorrecto
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;

Posted: Wed 21 May 2008 07:56
by Plash
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.

Possible solution...

Posted: Wed 21 May 2008 10:04
by usuarioincorrecto
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.

Posted: Mon 26 May 2008 08:25
by Plash
We have fixed the problem with ftDate and ftTime fields. The fix will be included in the next build of ODAC.

Next build

Posted: Tue 27 May 2008 11:34
by usuarioincorrecto
Hi;

Thank you for your quick response and for the fix.

When will next build be released?

Thank you

Greetings

Posted: Tue 27 May 2008 11:43
by Plash
We are planning to release new ODAC build in two weeks.