Re: ExecuteComplete does not fire with adAsyncExecute?




"David Rueter" <nospam_drueter@xxxxxxxxxx> wrote in message
news:OHdbT2s2HHA.3900@xxxxxxxxxxxxxxxxxxxxxxx
I am using an ADO Command object to execute a stored procedure. I have an
event hander to handle the ExecuteComplete event.

The event handler is called as expected, unless execution is with the
adAsyncExecute option set. In this case, the event handler is not called
upon successful completion execution. (Note: ExecuteComplete is called as
expected if an error is encountered on execution, even if adAsyncExecute
is
set.)

In other words, ExecuteComplete does not seem to fire upon successful
completion when the adAsyncExecute option is used.

Am I doing something wrong, or is this an ADO limitation? How am I
supposed
to know when asynchronous execution of a stored procedure is complete?
(MDAC 2.8 SP1)


The usual complaint is that the Event occurs too soon. Which can usualy be
repaired by setting Set NoCount On in the Procedure.

Commonly problems are experienced with the Complete event because in many
cases a closed/empty Recordset or result is returned immediately (allowing
the app to continue, non-blocking) which is then later filled.

I can't see any reason why it isn't working with the information you
provided. Perhaps if you provide more details showing all attributes,
properties, and code, someone might spot a problem.

-ralph


.