Print Thread
AfterQuery and IsEmpty function
#3785 08/06/02 10:12 PM
Joined: Oct 2001
Posts: 5
O
olbok Offline OP
Member
OP Offline
Member
O
Joined: Oct 2001
Posts: 5
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.

Re: AfterQuery and IsEmpty function
#3786 08/07/02 10:42 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
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


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 14 (0.010s) Memory: 2.4952 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-02 22:48:06 UTC
Valid HTML 5 and Valid CSS