SiteGuru.co.uk :: for website design and custom scripts, in the UK and elsewhere! ::
This site is best viewed at 800 x 600 or greater browser window, and using IE5.5+, NN6+, Moz 1.0+ or Opera6+; no side-bars (where available).
Valid XHTML 1.0! Valid CSS! We accept payment using NOCHEX to address: info@siteguru.co.uk. (Available to UK customers only) We accept payment through PayPal!, it's free and secure! Click here to make your payment online!
Hits = 1715
(> 20.06.02)

Articles

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.

Article by: Ian Anderson
SiteGuru.co.uk
March 2003

TIP: "System resource exceeded" error!

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

© 2001 - 2010 SiteGuru.co.uk. All rights reserved. All content in this site is provided 'as is' and no warranty is given as to the accuracy or suitability of any part hereof. No liability will be accepted for any death, injury, damages or loss, direct or consequential, howsoever caused, following the use or misuse of any advice or information, real or implied, provided by this site. No part of this site may be copied or reproduced without express written permission from SiteGuru.co.uk. All trademarks shown belong to their respective owners. We recommend that you read our standard terms and conditions before contracting us for any website design or custom script work. SiteGuru logo enhanced by Gabriele Kreichgauer.