TIMESTAMPDIFF MySQL causes TLargeintField

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alamonaca
Posts: 3
Joined: Fri 19 Jun 2009 20:16

TIMESTAMPDIFF MySQL causes TLargeintField

Post by alamonaca » Mon 29 Jun 2009 21:18

Hellow, i'm using UniDAC V 2.70.0.8.

Have a TUniQuery with the following text:

SELECT TIMESTAMPDIFF(DAY, DATE_MEET,NOW()) DELAY
FROM TABLE_1;

When I retrieve the fields, DELAY is a TLargeintField. The MySQL reference manual says than de return value of TIMESTAMPDIFF is an Integer type, so DELAY would be an TIntegerField.

I've set the OptimizedBigInt property to True, but still getting TLargeintField.

here the script to generate the test table:

CREATE TABLE TABLE_1 (DATE_MEET DATETIME);

INSERT TABLE_1 VALUES ('2009-06-01');

INSERT TABLE_1 VALUES ('2009-05-01');

INSERT TABLE_1 VALUES ('2009-04-11');


Thanks!

Alex

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 30 Jun 2009 07:39

Please do not duplicate topics. We have answered you in other thread.

Post Reply