Re: ADOQuery async operation



OK,

So I hit another problem.

When using the Query to update a record, after calling ExecSQL, which async event can I trap to signal completion?

I have tried RecordChange, FieldChange, AfterPost but non of them trigger.

Thanks,

Andy
Andy Stephenson wrote:
Hi,
I am using a TADOQuery and have set ExecuteOptions to [eoAsyncExecute], and have set ADOQuery.OnFetchComplete := MyHandler.

However, when I set ADOQuery.Active := true after setting the SQL, my handler never fires.

All of this happens in a thread, and the ADOConnection, ADOQuery are created in the .Execute of the thread before my while (not Terminted) loop. All works as expected if I use sync calls, but I want to let other threads in whilst waiting for the results.

So, working on the assumption I have missed something, does anyone know of any articles on using ADOQuery asynchronously? Google is not proving to be of help so far.

Thanks,

Andy
.