Jump to content
Sign in to follow this  

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 ??

Share this post

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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.