Print Page | Close Window

Killing all recordsets...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9346
Printed Date: 01 April 2026 at 1:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Killing all recordsets...
Posted By: zaboss
Subject: Killing all recordsets...
Date Posted: 29 January 2004 at 7:20am
Is there an way to kill all the recordsets open in page? I have the habbit of naming them differently for, in stance on a single page I might have a RSCheck, RSEmail, RSThis, RSThat... etc. In simple pages is ok there are less chances to left one open, but I'm dealing now with large pages (4-500 lines the simplest one) an i mighr overlook one... I wonder is there a way that I could just make an include an kill them at the end, whatever their names are.

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Replies:
Posted By: Semikolon
Date Posted: 29 January 2004 at 7:25am
do a search for something common in all recordsets(like rs or something).. then you find all the names and can kill them at the end of the page..


Posted By: zaboss
Date Posted: 29 January 2004 at 10:58am

On another forum the same question raise an interesting answer: You actualy don't need to kill all the recordsets in asp, but only in vb.

What do you think about this? It sounds logic... Once the page is served, the asp code it is "transformed" in pure html, so the recordset "dies" by natural causes  and the server is busy serving another page to another client... I doubt that it will keep the original recordset in memory, you know, just in case...



-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: Semikolon
Date Posted: 29 January 2004 at 11:03am
im not sure, but i think all objects(recordsets, mail, fso, etc) will stay in memory a long time after page generation if you dont kill them.. but as i said, im not sure.. but i think so.. anyways, its good coding practice, to close and kill all objects


Posted By: zaboss
Date Posted: 29 January 2004 at 11:13am
I'm not talking about good practice, which I totaly agree that once you open something, it is better to close it yourself . There might be though something on the server that kills it automatically since, for instace, there are chances that pages crush before even was parsed by the server, pages that are redirected before the rs is close or just simply poorly written code. This would kill even a not so busy server. Since there is no way that a host checks all clients files, it is safe to presume that some means of protection are there.

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: WebWiz-Bruce
Date Posted: 29 January 2004 at 1:08pm
The web server is ment to dropped objects once the page has been parsed, but in practise this doesn't always happen.

If you don't dropped objects including database connections and recordset objects after use it will slowly fill up your servers memory till your site gets so slow pages can't be prossed at all.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net