AfterQuery and IsEmpty function

olbok

Member
Hello.

I wrote the following code in the AfterQuery event handler:

ShowMessage(IntToStr(Sender.RecordCount));
If Sender.IsEmpty then
ShowMessage('Empty');

After opening this dataset I saw two messages: "2" and "Empty". This dataset really include two records. But why did I see "Empty" message?

Thanks.
 
These results are inconsistent of course, but the AfterQuery event fires as soon as the query is finished on the server. You cannot access the result set yet.

------------------
Marco Kalter
Allround Automations
 
Back
Top