Stop fetching
Posted: Mon 09 Jun 2008 19:09
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
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