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.
.RecordCount in AfterFetch = 0?
Re: .RecordCount in AfterFetch = 0?
tested with delphi xe & sdac 5.0.0.5 and also delphi xe6 & sdac 6.10.19. the same behavior detected.
Re: .RecordCount in AfterFetch = 0?
I can also see, that in .data.recordcount is the right value...
Re: .RecordCount in AfterFetch = 0?
i can perhaps see the problem. in afterfetch is (when 2nd time opening the dataset) the dataset.state = dsinactive!
Re: .RecordCount in AfterFetch = 0?
Hi,
Thank you for the information. We will change this behavior in one of the next versions.
Thank you for the information. We will change this behavior in one of the next versions.