Print Page | Close Window

ASP with ODBC refresh problem

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


Topic: ASP with ODBC refresh problem
Posted By: ObiWein
Subject: ASP with ODBC refresh problem
Date Posted: 04 November 2003 at 9:05am

I currently have a website setup on the localhost.  It is using ASP pages that make calls to an Access database using an ODBC DSN.

When I open a browser and load the page it will work initially.  Clicking refresh results in a connection error.  After several minutes with no changes made to any settings or pages, hitting refresh will load the page properly.

Any ideas?




Replies:
Posted By: Mart
Date Posted: 04 November 2003 at 9:45am

Are you cleaning up correctly... e.g. closing connections and resetting objects?

Mart.



Posted By: ObiWein
Date Posted: 04 November 2003 at 9:54am

Definitely closing the connection...

</html>
<%
Recordset1.Close();
%>

There really aren't any objects that need to be reset as far as I can tell.  Is there something I can add to reset all of them?  Also is that something that would reset automatically after a certain amount of time passes?  If I just wait a minute or so it'll then work once before having the same problem.



Posted By: Mart
Date Posted: 04 November 2003 at 10:12am

Set Recordset1 = nothing

Set adoConection = nothing



Posted By: ObiWein
Date Posted: 04 November 2003 at 10:20am

Where should I be adding those lines?  I keep getting an error stating that it is having problems with the Jscript compiler when I put those in.

Because the page is able to load properly before hitting the refresh button does it make sense that the error is even in the code?



Posted By: Mart
Date Posted: 04 November 2003 at 10:55am

Oh well i dont know jscript try this though (put it under RecordSet1.Close)

Set Recordset1 = nothing;

Set adoConnection = nothing;

(change adoConnetion to what your connection variable is)

Mart.




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