MySQL Editor: dtInteger Executable: dtInt64

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dementor
Posts: 2
Joined: Thu 03 Mar 2011 14:13

MySQL Editor: dtInteger Executable: dtInt64

Post by Dementor » Thu 03 Mar 2011 14:40

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?

AndreyZ

Post by AndreyZ » Thu 03 Mar 2011 16:13

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.

Dementor
Posts: 2
Joined: Thu 03 Mar 2011 14:13

Post by Dementor » Tue 08 Mar 2011 12:05

Thanks,

Update is on it's way...

Post Reply