TVirtualQuery Float field loaded as memo
Hello,
I have a DataModule that I use to do some calculations and eventually display a chart.
I have a TTable component with 2 Float fields (Rate and PieceRate). I assign this table to a TVirtualTable (vtPools). There are other tables as well. Next I Open a TVirtualQuery with this Query:
SELECT
p.ID,
rp.Route_ID,
e.Employee,
SUM(p.Rate) as Income,
SUM(p.PieceRate) as PieceRate
FROM
tblRoutePools rp
LEFT JOIN vtPools p
ON rp.Pool_ID = p.ID
LEFT JOIN tblRoutes r
ON rp.Route_ID = r.ID
LEFT JOIN tblEmployees e
ON r.Tech_ID = e.ID
GROUP BY rp.Route_ID
If I open the Fields Editor and add all fields the Rate and PieceRate fields are added as Memo fields. If I delete them and add them by hand as TFloat fields then when I try to set it to Active in the IDE I get a Field mismatch error Expecting a float actual is memo or close.
The program has been working fine for some time, I just delete the fields from the Field Editor and let them populate at runtime. However now I need to combine the 2 fields and
SUM(p.Rate) + SUM(p.PieceRate) as Income
Fails as they are memo fields instead of Float.
Why does TVirtualQuery add float fields as Memo Fields?
Why do I get an error if I add them by hand to the Field Editor as Float fields and try to set it as active?
Thank you
Gary