Different Declarations

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
majlumbo
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 17.01.2010, 03:15

Different Declarations

Post by majlumbo »

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

Code: Select all

select
...
datediff(curdate(), date_received) as "DaysInLab"
from
...
The 2nd query

Code: Select all

select
...
datediff(date_closed, date_received) as "num_days"
from
...
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?
majlumbo
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 17.01.2010, 03:15

Post by majlumbo »

I ended up deleting the ZQuery and Datasource components, added them again, with the same query, and the after adding the fields in the fields editor, I checked the definition of num_days. This time it correctly declared num_days as TLargeintField. Everything seems to be working.
Post Reply