Type mismatch of integers, MySQL v5.0.26 and above

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ts_sasha
Posts: 1
Joined: Tue 28 Nov 2006 15:04

Type mismatch of integers, MySQL v5.0.26 and above

Post by ts_sasha » Tue 28 Nov 2006 15:28

Hello,
I get this error from query
"Type mismatch for field, expecting: LargeInt actual: Integer."

select is like this:

select
(to_days(datefield1)-to_days(datefield2)),
month(datefield2)
from tablename

datefield1 and datefield2 are defined as date in the mysql.

Both field are defined as TLargeInt in Delphi app and the query worked on MySQL v4.0, v4.1 and v5.0.19 and bellow. I have tried to cast as unsigned and it works, but casting as signed doesn't.

I'm using BDS Delphi 2006 and MyDAC v4.30.0.11 (tried with v4.40.0.19 too with the same result).

Does anybody have a solution?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 29 Nov 2006 15:49

Thank you for information. Unfortunately we could not reproduce the problem.
Please send (evgeniyD*crlab*com) a complete small sample to demonstrate it, including script to create and fill table.

Post Reply