In a discussion recently the topic of trashing objects when you are finished with them came up.
This person was pretty adamant that after finishing with a recordset or setting any object that it should all clean up with
objectvar.close()
set (objectvar) = nothing
His argument was that if do something like this:
set rs= Server.CreateObject("ADODB.Recordset"
rs.ActiveConnection = MM_SQLSERVER_STRING
rs.Source = "SELECT * FROM reallybigdatabase"
rs.Open
and (say) 100 people do the same thing and all the objects are left hanging then the server performace will be degraded.
Makes sense and I am getting into the habit of closing and nuking the object, but I notice that Dreamweaver UltraDev doesn't do "set rs=nothing" after it creates the "rs.close()" code.
Not that they are perfect, but I would have thought it was something theyw ould do if it was important.
Any thoughts??????
Steve Davis
hey.you@hahaha.com.au
This person was pretty adamant that after finishing with a recordset or setting any object that it should all clean up with
objectvar.close()
set (objectvar) = nothing
His argument was that if do something like this:
set rs= Server.CreateObject("ADODB.Recordset"
rs.ActiveConnection = MM_SQLSERVER_STRING
rs.Source = "SELECT * FROM reallybigdatabase"
rs.Open
and (say) 100 people do the same thing and all the objects are left hanging then the server performace will be degraded.
Makes sense and I am getting into the habit of closing and nuking the object, but I notice that Dreamweaver UltraDev doesn't do "set rs=nothing" after it creates the "rs.close()" code.
Not that they are perfect, but I would have thought it was something theyw ould do if it was important.
Any thoughts??????
Steve Davis
hey.you@hahaha.com.au