Int Type Mismatch: Expecting LargeInt.

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
w0wbagger
Posts: 7
Joined: Wed 24 Aug 2005 20:23

Int Type Mismatch: Expecting LargeInt.

Post by w0wbagger » Fri 10 Nov 2006 20:37

Hi there, I've just upgraded from MySql 5.17 to 5.24.

For some reason, an old query is no longer working correctly. It says it is expecting a LargeInt, but getting and Integer.

The Query looks like this:

SELECT c.Name, CONCAT(MONTHNAME(l.release_date), ', ', YEAR(l.release_date)) AS month_text,
MONTH(l.release_date) AS release_month, YEAR(l.release_date) AS release_year, l.importer_id,
t.transaction_no, t.transaction_id, cast(count(*) AS UNSIGNED) AS probill_count
FROM (lvs_shipment as l, company as c)
LEFT JOIN transaction AS t ON t.transaction_id=l.transaction_id
WHERE (t.transaction_id IS NULL OR (transaction_status != 'AC' AND transaction_status != 'SN'))
AND c.company_id = l.importer_id
GROUP BY l.importer_id, t.transaction_id, month_text
ORDER BY release_year, release_month, Name

The error occurs on the release_month. When I add it to the field editor, it automatically gets added as a LargeInt, (why? it only goes from 0-12), but obviously, when in a query, it only returns an Int.

Any suggestions? I've tried removing and re-adding the field, but it keeps adding it as a LargeInt. Do I need to manually change the .h file and the .dfm file to be Integers?

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

Post by Antaeus » Mon 13 Nov 2006 14:47

Please try to simplify your query to maximum possible extent and show us the script to create objects used in the query. You can send them to evgeniyD*crlab*com.

Post Reply