Closing a db connection after adAsyncExecute

Results 1 to 7 of 7

Thread: Closing a db connection after adAsyncExecute

  1. #1
    Ruurd Guest

    Default Closing a db connection after adAsyncExecute

    Hi,<BR><BR>Here is an unanswered harder question for you guys!<BR><BR>When I want to quickly execute a stored procedure which will not return a recordset I use this setting: adAsyncExecute<BR><BR>However, when I do a Conn.close and set conn = nothing I get errors like: can&#039;t perform that action on a busy/open connection..<BR><BR>Seems logical ofcourse, but is there any way around this??<BR><BR>I would like to fire up my sp&#039;s and then without waiting for the return do a response.redirect.<BR><BR>Thanks,<BR>Ruurd

  2. #2
    URGENT Guest

    Default Hey, please please help me on this.. pretty import

    NT... but an important question it is.. plz help if you have suggestions, or can tell me that it will not work whatever i will try!

  3. #3
    Join Date
    Dec 1969

    Default Okay, I went looking...

    I sure didn&#039;t know the answer to this, but I figured it had to be *somewhere* in the docs.<BR><BR>I got to here:<BR><BR><BR>which mentions that when the command completes you get an event (and I presumed this applied to an async operation, as well):<BR><BR><BR>And that got me to here:<BR><BR><BR>Which got me here:<BR><BR><BR>And then here:<BR><BR><BR>and also here:<BR><BR><BR>Enough said?<BR><BR>Ready to start writing a custom component in VB or C++?<BR><BR><BR><BR>

  4. #4
    Ruurd Guest

    Default RE: Okay, I went looking...

    And yes, I spend many hours on msdn before I even posted here. =]<BR><BR>thnx for the links though. I was soooo hoping not to have to go writing components, my host will not allow them. <BR><BR>Cheers,<BR>Ruurd

  5. #5
    Ruurd Guest

    Default Actually

    I don&#039;t get the fact that i get errors (sometimes, not always) when I do a redirect, without closing the db connection.

  6. #6
    Join Date
    Dec 1969

    Default A *Guess*

    It possibly depends on whether or not the async execution has completed? If so, no error????<BR><BR>Remember, the events *ARE* coming back from the DB, no way to prevent that. It&#039;s just that nothing in VBS can handle them. That does *not* say that ADODB.Connection isn&#039;t doing something with them, under the covers. In fact, from reading those docs, I&#039;d say that it is.<BR><BR><BR><BR>

  7. #7
    Ruurd Guest

    Default RE: A *Guess*

    You are right, but if I just don&#039;t close the db connection (ouch) and already do a response.redirect, it still gives errors (when sp hasn&#039;t finished yet). That is a bit weird, since a redirect should not care!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts