Page 1 of 1

Type mismatch of integers, MySQL v5.0.26 and above

Posted: Tue 28 Nov 2006 15:28
by ts_sasha
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?

Posted: Wed 29 Nov 2006 15:49
by Antaeus
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.