Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange ASP Database Connection Failure 1

Status
Not open for further replies.

IanAble

Programmer
Joined
Jan 24, 2005
Messages
112
Location
GB
Here's an 0x80004005 error (Microsoft Jet database engine cannot open the file... It is already opened exclusively by another user, or you need permission to view its data.) with a twist. The database file is a secured access 2000 mdb file and the following works until you compact the database file:

<%
dim cnnCurrent
dim strConnection

set cnnCurrent = Server.CreateObject("ADODB.Connection")
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; "
strConnection = strConnection & "Data Source=[MDB Absolute File Path]; "
strConnection = strConnection & "Jet OLEDB:System database=[MDW Absolute File Path]; "
cnnCurrent.Open strConnection, [UserID],[Password]

... further coding

cnnCurrent.close
%>

This is a classic ASP file (written in MS Visual Interdev 6) on an XP Pro machine.

Ideas anyone?
 
Do you have the db open? asin actually viewing it with ms access

after comapcting I believe access changes the permissions also. check the directory and make sure full permissions are set so the ldb can be created.



General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Compacting acutally makes a new copy of the file and deletes the old one.
 
Sorry, I've had 3 cups of coffee already and I'm on the edge of my seat to filter some of that lovely caffeine through my fingers :P



General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Ta muchly for your speedy response peeps. onpnt that link was spot on. I've sorted out file-sharing for the parent folder and things are working again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top