Jump to content

ADODB closing of result set objects?

Recommended Posts

So I've seen a lot of code on here where people open result set objects, but no one ever seems to explicitly close them. Does this mean something is closing them for me automagically? If so, I'd like to know when this occurs: Never, are they leaking? When the variable loses scope? When the script exits? Something else?


Example taken from another post:

$ado = ObjCreate( "ADODB.Connection" )
$ado.Open( "DSN=zeco" )
$adors = ObjCreate( "ADODB.RecordSet" )
$adors.Open( "SELECT name FROM test", $ado )
While not $adors.EOF
    MsgBox(0, "Result", "Name = " & $adors.Fields("name").Value )
;  who closes $adors ??
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...