I have two different queries with similar selects, that is producing two different declaration types in Delphi
The 1st query
Code: Select all
select
...
datediff(curdate(), date_received) as "DaysInLab"
from
...
Code: Select all
select
...
datediff(date_closed, date_received) as "num_days"
from
...
DaysInLab as a TLargeintField
and
num_days as TIntegerField
Every so often, I get an error on the 2nd query saying that my query expects an integer field in num_days, but is receiving a Largeint. I simply delete num_days from the fields editor, add it again, and the query magically works again, only to happen again weeks later.
Any idea why the different declarations for what seems to be similar selects?