.RecordCount in AfterFetch = 0?
Posted: Wed 04 Jun 2014 13:14
Hi,
I have TMSQuery with fetchall = false. Sometimes I'm getting invalid value (0) in .RecordCount property in the AfterFetch event, although I can see many fetched records in a dbgrid (> 20). This happens especially on SECOND opening of then same query component (query.open -> 30 (ok). query.close, query.open -> 0 (wrong)). In the subsequent afterfetch call (dataset got scrolled) is the value again ok.
Is this known behavior? Is there some other way to get ALWAYS correct count of fetched record in afterfetch event?
Thanks, Ludek.
I have TMSQuery with fetchall = false. Sometimes I'm getting invalid value (0) in .RecordCount property in the AfterFetch event, although I can see many fetched records in a dbgrid (> 20). This happens especially on SECOND opening of then same query component (query.open -> 30 (ok). query.close, query.open -> 0 (wrong)). In the subsequent afterfetch call (dataset got scrolled) is the value again ok.
Is this known behavior? Is there some other way to get ALWAYS correct count of fetched record in afterfetch event?
Thanks, Ludek.