ExecuteComplete ADODB Connection event not fired with adAsyncExecute parameter

前端 未结 1 900
离开以前
离开以前 2020-12-06 14:06

I have a problem trying to catch the completion of a stored proc execute asynchronously.

Below my code VBA (in a class module named clsAsync):

Option         


        
1条回答
  •  隐瞒了意图╮
    2020-12-06 14:47

    I solved my problem replacing the calling code:

    Sub testASYNC()
        Dim a As New clsAsync
        Call a.execSPAsync
    End Sub
    

    with this new code:

    Private a As clsAsync
    
    Sub testASYNC()
        Set a = New clsAsync
        Call a.execSPAsync
    End Sub
    

    In the async mode, the object "a" is no longer available at the end of the procedure (scope visibility issue).

    0 讨论(0)
提交回复
热议问题