Print Page | Close Window

where to flush the conn & recordset obj?

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=5314
Printed Date: 30 March 2026 at 7:46pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: where to flush the conn & recordset obj?
Posted By: ngaisteve1
Subject: where to flush the conn & recordset obj?
Date Posted: 26 August 2003 at 9:13pm
what do you think of my code below? Is it fine for me to close the connection and recordset object this way or before response.redirect? Or after response.redirect, it will still close them?

if not rs.eof then
     response.redirect "rate_add_form.asp"
else
     response.redirect "rate_login.asp?errormesg=Invalid user id or password. Try again."
end if

conn.close
set conn = Nothing
rs.close
set rs = nothing



Replies:
Posted By: ljamal
Date Posted: 27 August 2003 at 7:13am
Before the redirect otherwise it doesn't get executed.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: ngaisteve1
Date Posted: 27 August 2003 at 6:40pm
ok. thanks.



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