Different Declarations
Posted: 12.01.2011, 18:16
I'm using ZEOS 6.6, Delphi 2006 and MySQL 5.1.
I have two different queries with similar selects, that is producing two different declaration types in Delphi
The 1st query
The 2nd query
From the fields editor, I add all the fields, but I see that Delphi declares
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?
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?