Solved

Constantly losing connection to Access via ODBC

Posted on 2008-06-24
3
511 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

840 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