Solved

Constantly losing connection to Access via ODBC

Posted on 2008-06-24
3
512 Views
Last Modified: 2008-07-22
I am the webmaster of Dauphin County, we created an access program a few years back that we enable the Personnel department to process, edit, add, delete job posting.  I then connect to the access app thru an ODBC connection. simple.

but for some reason, it stopped working properly... almost on a nightly occurance now, the connection string will drop and the postings will display:




Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.

/employment/fulltime.asp, line 76

I tried everything and it still seems as if the connection will just automatically drop.  Each morning I come in, I immediatly open the server and reset WWW service and it fixes the issue, until it drops again.

is there anything suggestions on why this is happening?

(On dauphincounty.org, the postings are set in an IFRAME which is pulled from dauphinc.org and dauphinc.org is also the same server where the ODBC connection is.)
0
Comment
Question by:Justin Imes
3 Comments
 
LVL 10

Accepted Solution

by:
Dxpert earned 250 total points
ID: 21856911
See this:

"It looks to me like you are running into the standard threading issue that
happens when you use Access as the backend database to an Asp application.
The Access ODBC driver is not thread-safe and when it is used in a
multi-threaded environment such as IIS you will see intermittent problems.
We do not recommend that you use Access as the back end of an ASP
application, but if it is absolutely necessary, I recommend that you change
your connection string so you are using the Jet OLE DB Provider instead.

The following articles will explain this a bit further and also provide
some of our best practices for developing a stable Asp application.

"Q299973 ACC2000: Using Microsoft Jet with IIS" found at:
http://support.microsoft.com/support.../q299/9/73.asp

"Q258939 Recommendations for Connecting to Databases Through IIS" found at:
http://support.microsoft.com/support.../q258/9/39.asp

"Q306518 INFO: Troubleshooting Guide for 80004005 Errors" found at:
http://support.microsoft.com/support.../q306/5/18.asp

I hope this helps."

http://www.dbforums.com/showthread.php?t=553649
0
 
LVL 8

Expert Comment

by:Chumad
ID: 21857041
Are you opening and closing the connection with each request? You should be so that you can take advantage of pooling. If you open the connection but never close it, you'll get a connection leak and eventually run out of available connections and start getting errors.

Granted, this is a shot in the dark, but it's worth trying.
0
 
LVL 9

Author Comment

by:Justin Imes
ID: 21857107
Dxpert:
I know using Access isn't the best way to go, but I do not neccessarily have time to restructure the employment section.  But i was afraid it was the ODBC driver... I will look into updating to the latest Jet drivers and try that way.
The DB thread sounds like my problem.

Chumad:
thanks, but yes i am definetly closing each instance.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question