Fur Posted November 21, 2005 Share Posted November 21, 2005 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? Thanks!! 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 ) $adors.MoveNext WEnd ; who closes $adors ?? $ado.close Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now