To DSN, Or Not To DSN - That Is The Question! Posted July 12th 2002.
TIP: "System resource exceeded" error! Posted March 6th 2003.
AMD Overclocking Guide (Athlon64 and Opteron) Posted January 10th 2006.
Have you ever had that error in your ASP pages that acted on an Access database and wondered what it was? If yes then read on.
(Derived from a forum discussion at http://www.programmersresource.com/forum/treplies.asp?message=6146).
Basically the problem relates to how ASP fundamentally works - even though you open a DB connection, it uses it only for the first SQL query. For subsequent queries on the same open connection then ASP spawns its own connection but doesn't properly release it, thus leading ultimately to server memory leaks which can only be resolved by rebooting the server!
It seems that the only way to prevent this happening is to use the following methodology in your ASP code ...
For Each SQL Query
¤ Open DB connection
¤ Make recordset
¤ Use the data
¤ Close and kill the recordset
¤ Close and kill the connection
Next
... The total anti-thesis to accepted coding practise!
Who said everything had to make sense?
Enjoy! :-S
Ian Anderson
Founder and CEO
SiteGuru.co.uk