Page 1 of 1

MySQL Editor: dtInteger Executable: dtInt64

Posted: Thu 03 Mar 2011 14:40
by Dementor
Hello,

I am using:
MySQL 5.3.1
Delphi 2006
mydac 4.40.0.19
Rave 6.5.

Underneath code wil generate a dtInteger from MySQL Editor. The report is designed with this type. However, when I execute the query from the executable it wil generate a dtInt64 resulting in a ERaveExeption; dtInteger expected, dtIn64 found.

Code: Select all

       DATEDIFF(RR.REI_DATUMBEGIN,CURDATE()) AS DGN_TOT_REIS,
Does somebody know how this is possible or how to avoid it?
Is this a known issue?

Posted: Thu 03 Mar 2011 16:13
by AndreyZ
Hello,

The point is that MySQL server returns the FIELD_TYPE_LONGLONG field type for this query. MyDAC maps such fields as TLargeintField. Starting with MyDAC version 5.20.1.14, the TMyConnection component has the OptimizedBigInt option that allows processing fields that are results of numeric function or cast values as usual Integer fields. With the TMyConnection.Options.OptimizedBigInt property set to True, MyDAC maps the result of this query as TIntegerField. You can upgrade MyDAC at least to this version or redesign your report with the dtInt64 type.

Posted: Tue 08 Mar 2011 12:05
by Dementor
Thanks,

Update is on it's way...