Page 1 of 1

Stop fetching

Posted: Mon 09 Jun 2008 19:09
by Alkatraz3
Ok, simple question, since my previous thread somehow avoid attention - how to stop fetching?

I know it sounds stupid, but i cant stop fetching process - for example, i need to stop fetching, if current record count is above 500 records. NonBlocking is set to true, FetchAll true and QueryRecordCount to False. When i open dataset it begin to fetch records and when it reaches 500 i set the Cancel property to True in the BeforeFetch event. But when i trace it - it still continue to fetch. Then i tried to BreakExec it from another thread. If i set Cancel = Not DataSet.Fetching then it seems to stop, but Fetching property is still True, even if it act like it is False...

I dont understand - what is wrong? How to correctly stop fetching data on demand?

Delphi 2007/Vista/SDAC4.35

Posted: Wed 11 Jun 2008 15:23
by Antaeus
It was a bug in SDAC. We have fixed it. This fix will be included in the nearest build of SDAC.

Posted: Fri 13 Jun 2008 12:26
by Alkatraz3
Oh, i see... Have to wait for next build then...

So to stop fetching i must set Cancel property to true, or call BreakExec from another thread, correct? Or i must track Fetching property in OnBeforeFetch event and Cancel once it False?

And another question - you mention you can make asynchronous opening of datasets in future, so any hint when it will be implemented?

Posted: Tue 17 Jun 2008 07:58
by Antaeus
The build with this fix has already been released.

> So to stop fetching i must set Cancel property to true, or call BreakExec from another thread, correct?
Yes, you are right.

> And another question - you mention you can make asynchronous opening of datasets in future, so any hint when it will be implemented?
At the moment I cannot specify the exact time for this task. We will try to implement it as soon as possible.

Posted: Tue 17 Jun 2008 15:22
by Alkatraz3
I see... Thanks for answers.