Page 1 of 1

refresh(record) on query with sum doesn't work

Posted: Thu 22 Jan 2009 14:31
by jkuiper
I put an MyQuerycomponent with this query

Code: Select all

SELECT ontvangsten.snr, ontvangsten.inkoopregelnummer, 
SUM(ontvangsten.aantal_bollen) AS ontvangenbollen 
FROM ontvangsten
WHERE ontvangsten.snr = :snr
GROUP BY ontvangsten.snr, ontvangsten.inkoopregelnummer
It is a detail query related to my master table. when I go to my childform and close it again, I use refreshrecord on the detail table, so I can see the new sum. The refreshing doesn't work and Delphi comes with the error

Project raised exception class EMySQLException with message '
#42S22Unknown column 'ontvangenbollen'in 'fieldlist''

This AV also occurs when I put the fields in the fieldlist @Designtime and set the field ontvangen.readonly := true;

I'm using MyDAC 5.70.0.42

Posted: Thu 22 Jan 2009 14:41
by jkuiper
just upgraded to 5.70.0.44, but the problem still exists

Posted: Fri 23 Jan 2009 07:49
by Dimon
To solve this problem try to set the TMyQuery.Options.FullRefresh property to True.

Posted: Mon 26 Jan 2009 08:31
by jkuiper
Thanks. As far as I can see, it works :lol: