Re: Delphi 6 - ADO - MS SQL Server



In article <4513d7aa@xxxxxxxxxxxxxxxxxxxxxx>, gnome@xxxxxxxxx
(AquaGrrlll) wrote:

I set the ExecuteOptions = [eoAsyncExecute]. Now it just
rips along, although I have some problems using it within a
multi-threaded application. I get the following:

Operation cannot be performed while executing asynchronously

You need to create a FIFO queue for your SQL statements, using a
message triggered from the ExecuteComplete event (where you must
check the result of each async operation) to execute the next
statement.

Very rarely, you'll still see the error you mention, so just put
the failed statement onto the top of the queue and execute it
again. This seems to be an ADO bug with it's own thread.

Angus
.