Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Killing all recordsets...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Killing all recordsets...

 Post Reply Post Reply
Author
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Topic: Killing all recordsets...
    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
Soft 4 web
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.