Link to home
Start Free TrialLog in
Avatar of Justin Imes
Justin ImesFlag for United States of America

asked on

Constantly losing connection to Access via ODBC

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.)
ASKER CERTIFIED SOLUTION
Avatar of Dxpert
Dxpert
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chumad
Chumad

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.
Avatar of Justin Imes

ASKER

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.