Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset Using <OBJECT> tag 1

Status
Not open for further replies.

Deadline

Programmer
Feb 28, 2001
367
US
Hi,
When I use <OBJECT> tag to create a Recordset/Connection, need I have to explicitly Destroy it by
Code:
Set cn=Nothing
? Or Is it automatic ??
Thanks!

RR


 
It is good practice to explicitly destroy it each time. Technically, the objects are stateless, in that when the page is done loading, they disappear, but it is considered good programming practice to destroy them anyway --

And especially if dealing with connection objects and other things that can tie up server and db resources unless you destroy them as soon as you're done using them... you might even want to destroy them halfway through the page if you aren't going to use them again -- will improve the performance on high traffic sites (low traffic, too, but you just won't notice it very much).

:)
Paul Prewett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top