Solved

Constantly losing connection to Access via ODBC

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now