Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: Dedicated Windows Managed Server?

date posted 23rd April 2008 15:12

Ben wrote:
> Mmmm .. I'm reasonably certain from reading MS documentations that ADO
> Connection and Recordset objects - like any other ASP object - will
> automatically be destroyed when the page finishes. The only exception
> that I am aware of is if the code is explicitly storing a reference to =

> an ADO object in an Application / Session variable (which is a bad =
idea
> anyway, due to threading issues).

Colin wrote:
> Well that is where the problem lies, although ASP will automatically=20
> destroy the objects, the connection and/or recordset in SQL will =
remain=20
> open until timeout and the MS documentation doesn't cover this, that =
is=20
> why there are so many badly coded ASP sites, because this wasn't=20
> considered at the time of writing the page. It only becomes apparent=20
> once there is load on a site.

Interesting. ADO Recordsets are database-independent COM objects, =
nothing to
do with SQL Server, so I'm confident that they are automatically =
disposed of
by garbage collection as soon as they go out of scope, without using =
Close()
.. unless stored in a Session/App var.

The Connections angle is more plausible though - the ADO objects would =
be
correctly destroyed, but feasibly the clean up might not return the =
physical
connection to the pool. This still seems doubtful, though, as ADO =
manages
connection pooling and its Connection objects will have clean-up code =
that
is run as soon as it is destroyed, releasing the physical connection.

Can you point toward a reference that shows that not explicitly closing
Recordset/Connection objects at the very end of the page causes =
additional
resources to be used after the page has finished?=20

I'm always wary of taking tuning theory at face value, ever since =
applying
the MSDN tip on TypeLibs, then finding out later that it actually
significantly reduces performance! :)

Many thanks, Ben

--
Ben Johnson, Neogic Web Solutions
// design . development . managed hosting

w | http://www.neogic.com
t | +44 (0)1242 808 262
e | [EMAIL REMOVED]
=20




Messages by Day
April 30th 2008
April 29th 2008
April 28th 2008
April 27th 2008
April 26th 2008
April 25th 2008
April 24th 2008
April 23rd 2008
April 22nd 2008
April 21st 2008
April 20th 2008
April 19th 2008
April 18th 2008
April 17th 2008
April 16th 2008
April 15th 2008
April 14th 2008
April 13th 2008
April 12th 2008
April 11th 2008
April 10th 2008
April 9th 2008
April 8th 2008
April 7th 2008
April 6th 2008
April 5th 2008
April 4th 2008
April 3rd 2008
April 2nd 2008
April 1st 2008


Messages by Month
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000