Daniel Stoch
Member²
Hi,
I want to allow user to stop fetching records in TOracleDataSet. There is a very good example about activating dataset in a thread, but the problem is when user wants to scroll data in active dataset?
I have the following situation, eg.:
- OracleDataSet.Active := True -> fetching first 100 records, user can browse them in a grid,
- OracleDataSet.Last -> user scrolls to the last record (or any other record which is not fetched yet), OracleDataSet fires QueryRecord procedure to fetch next records,
- how to stop this operation?
I can write a "monitor" thread: when user press ESC button I set up a flag to stop fetching records, which will be examinated in AfterFetchRecord event. But I don't know when should I start and when should I stop this thread
. I think events like: BeforeFetching and AfterFetching will be useful. But unfortunatelly TOracleDataSet does not have such events, BeforeQuery and AfterQuery are called in diffrent situations (before activating and after fetching last record).
Have you any suggestions how to solve this problem?
Best regards,
Daniel Stoch
I want to allow user to stop fetching records in TOracleDataSet. There is a very good example about activating dataset in a thread, but the problem is when user wants to scroll data in active dataset?
I have the following situation, eg.:
- OracleDataSet.Active := True -> fetching first 100 records, user can browse them in a grid,
- OracleDataSet.Last -> user scrolls to the last record (or any other record which is not fetched yet), OracleDataSet fires QueryRecord procedure to fetch next records,
- how to stop this operation?
I can write a "monitor" thread: when user press ESC button I set up a flag to stop fetching records, which will be examinated in AfterFetchRecord event. But I don't know when should I start and when should I stop this thread

Have you any suggestions how to solve this problem?
Best regards,
Daniel Stoch