Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    London
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Loop ADODB objects

    Anyone know if this is possible?

    Is there a method when page execution has finished in ASP to test whether any ADODB objects are still open and, if so, to loop through the open ADODB objects?

    That way I can close them making sure I'm not leaving any open.

    Thanks

    Dominic
    dominicall - confusing himself more and more each day

  • #2
    Regular Coder hinch's Avatar
    Join Date
    Sep 2005
    Location
    UK
    Posts
    923
    Thanks
    25
    Thanked 80 Times in 80 Posts
    something like (dont hold me to this)


    PHP Code:
    for each strItem in ServerVariables.ADODB 

    ofc you could just make sure you manually close each record set after you've finished using it

    and then just at the bottom of the page close the connection and object.
    since in reality you only ever need one connection object and just multiple record set's

    if i can find the correct variable i'll post it in abit

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    London
    Posts
    179
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks hinch

    I'm normally pretty religious about closing recordsets, connections, etc... but wanted to see if there was a fallback that would do a final check and close anything that was open.

    Will give that a go and refer to my ServerVariables notes.

    Dominic
    dominicall - confusing himself more and more each day


  •  

    Posting Permissions

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