Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP with ODBC refresh problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP with ODBC refresh problem

 Post Reply Post Reply
Author
ObiWein View Drop Down
Newbie
Newbie


Joined: 04 November 2003
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ObiWein Quote  Post ReplyReply Direct Link To This Post Topic: ASP with ODBC refresh problem
    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?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2003 at 9:45am

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

Mart.

Back to Top
ObiWein View Drop Down
Newbie
Newbie


Joined: 04 November 2003
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ObiWein Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2003 at 10:12am

Set Recordset1 = nothing

Set adoConection = nothing

Back to Top
ObiWein View Drop Down
Newbie
Newbie


Joined: 04 November 2003
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ObiWein Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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.

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.