Solved

Microsoft Jet database engine cannot open the file

Posted on 2004-07-31
49
10,807 Views
Last Modified: 2012-06-27
Getting the infamous error when using an Access MDB: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

...when access from an ASP page using IIS 4

Tried the suggestions to assign necessary rights to IUSR_<machinename>.
Assigned full rights to the temp folders.
Also checked the security level for the login and make sure that login has rights to the folder

Have reviewed: http://support.microsoft.com/default.aspx?scid=kb;EN-US;174943
and: http://support.microsoft.com/default.aspx?scid=kb;en-us;306269

I'm stumped.  Any suggestions?

0
Comment
Question by:Thirt
  • 18
  • 17
  • 5
  • +3
49 Comments
 
LVL 37

Expert Comment

by:meverest
ID: 11686200
Hi,

are you confident that you know all the temp locations?  there is a problem in iis whereby it does not know where the temp location is and so writes the temp data to winnt or system32.

the temp folder is set by adding a *system* (ie not user) environment variable under 'my computer'->properties then add system env variable "TEMP" and "TMP"

making sure thatthe anon user has access to those.

cheers,  Mike.
0
 
LVL 1

Expert Comment

by:gexen
ID: 11687771
Is there an .ldb file?  If not, then either the permissions are wrong or your database is corrupt.
0
 
LVL 2

Accepted Solution

by:
MarcRosenberg earned 500 total points
ID: 11696127
Add the ISUER_(machine Name) account to the Administrators group and permissions are granted.  Also be sure to stop the web server and re-start so that permissions are reset.
0
 
LVL 4

Author Comment

by:Thirt
ID: 11707753
Thanks for the help Meverset, but I doubled checked the temp values. Looks like MR nailed it.
0
 

Expert Comment

by:rob-norton
ID: 12505688
Add the anonymous internet user account to the local system adminstrator group?! Hardly a solution for a production server is it?
0
 
LVL 2

Expert Comment

by:MarcRosenberg
ID: 12508362
Mr. Norton... your point is made. Have you another solution?
0
 

Expert Comment

by:rob-norton
ID: 12521518
Indeed. The solution to this is to grant the IUSR_<macine_name> and IWAM_<machine_name> users read/write permission on the following:

 The database file
The folder which contains the database file
The system temp folder
0
 

Expert Comment

by:rob-norton
ID: 12521521
If you are using XP, you can set the permissions for the user group "Web Anonymous Users" which contains both the IUSR and IWAM users.
0
 
LVL 2

Expert Comment

by:MarcRosenberg
ID: 12527425
Rob... thanks man.. this is really going to help me out when I do an install later this month.
0
 
LVL 2

Expert Comment

by:MarcRosenberg
ID: 12527438
I wonder if we can arrange for Rob to receive the points on this question. I have since become a paid subscriber so I have no problem forfeiting the points to Rob.
0
 
LVL 4

Author Comment

by:Thirt
ID: 12527685
Hey Marc,

what I've seen members do is create a new question title "Points for Rob" and then wait for Rob to reply and award the points to him.

At least that's what I was getting ready to do, if there isn't a better way.
0
 
LVL 2

Expert Comment

by:MarcRosenberg
ID: 12528114
Done.. thanks for the suggestion... its waiting out there for your Rob.
0
 

Expert Comment

by:rob-norton
ID: 12531130
That's awfully kind of you, thanks. I've done a forum search but there are a few "Points for Rob" questions out there - none of which seem obviously for me, can you clarify the exact title of the question..

Cheers,

--
Rob.
0
 
LVL 4

Author Comment

by:Thirt
ID: 12532345
opps, appears it got kaboshed bye the admin.
http://www.experts-exchange.com/Web/Q_21199200.html

(I clicked on marc's username, and viewed his log of questions.)
0
 

Expert Comment

by:CarCo
ID: 13062508
Hi!

Just wanted to say that MarcRosenberg solution also solved my problem, but he just mispelled the IUSR_<machinename>.

Thanks a lot Marc and all the others for the collaboration

Big hug
0
 

Expert Comment

by:CarCo
ID: 13062533
tip:

an easy way to go to Admin group is by right clicking in My Computer--> Manage-->Local users and groups--> groups-->Administrators and then grant the privileges!!
0
 
LVL 37

Expert Comment

by:meverest
ID: 13062767
just a note of warning - setting IUSR_<computername> to administrative group can be a little dangerous - if someone manages to upload a file to the web server, then it can be executed as administrator privilege, and then do effestively anything to your server and any other system recognising that admin user...

cheers.
0
 

Expert Comment

by:CarCo
ID: 13062782
hmmm! thats a good point!

Is there a way to go around that security problem and making the database function properly ??
0
 

Expert Comment

by:rob-norton
ID: 13062802
See my comments above, starting 11/05/2004.
0
 

Expert Comment

by:CarCo
ID: 13062845

how do u give permissions for 2 users? i can only do it for one in the files and folders u talk about!? its in the authentication methods --> anonymous access right??

and is that solving the security problems?

waiting for an answer!

thanks
0
 

Expert Comment

by:CarCo
ID: 13062865
i can only give access to one of them! :(
0
 

Expert Comment

by:rob-norton
ID: 13062883
No, it's in the NTFS security settings for the folder/file -> right-click on folder/file and choose "Properties"; click "Security" tab. This is where you add the permissions for the web users. This gets around the security problems that are associated with simply adding the web users to the local admin group (please do not do this under any circumstances).
0
 

Expert Comment

by:CarCo
ID: 13062926
hmmm, i see your point!

i probably dont have that option enabled to see the security tab when right clicking a file/folder. can u please remind me how to enable it?! i remember doing it in the past but not anymore :S

thnks
0
 

Expert Comment

by:rob-norton
ID: 13063010
1. Open "My Computer" -> click "Tools" -> "Folder Options"
2. Click the "View" tab
3. Scroll to the bottom of the list and un-check "Use Simple File Sharing"
4. Click OK
0
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

 

Expert Comment

by:CarCo
ID: 13063028
u r da man rob!!!

now i will do as u say above and see if it works good!!

thanks a lot! learning a lot so far with your help!!
:))
0
 

Expert Comment

by:rob-norton
ID: 13063061
Glad to be of assistance :)
0
 

Expert Comment

by:CarCo
ID: 13063184
now i have other more or less related question, should i post it here or create a new topic?!

it has to do with the refresh rate of the database i think! i can only interact with it once in a certain amount of time, it gives me error the second time i trye to interact in a row, i have to wait some time and then i can interact again.

the error it gives is this one:

Error Type:
Provider (0x80004005)
Unspecified error
 
0
 

Expert Comment

by:rob-norton
ID: 13063190
Are you using MS Access?
0
 

Expert Comment

by:rob-norton
ID: 13063229
This is a well-known issue with Access. I don't know why it does it and I don't think there is much you can do to get rid of it completely. I have had limited success by setting the ConnectionTimeout property of the connection object thus:

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 10
objConn.open <db_connection_string>

However if you want my advice, use MySQL instead.
0
 

Expert Comment

by:CarCo
ID: 13063257
:))

i have never used MySQL, it will probably take me a lot to understand it...

i now that there is a solution for that refresh rate problem... i have used it in the past, but like i say, i totaly forgot how to...

Anyway, thanks a lot for all your help, u r da man!!

Big Hug
0
 

Expert Comment

by:rob-norton
ID: 13063295
If you remember the solution, I'd be interested to hear it. I know about a dozen other developers who would be interested too! Purely academic of course as no-one I know uses Access for production web projects anymore.

MySQL is really very easy to use, you can even get a GUI for it if you don't fancy grappling with the command line, although even that is very easy. Best of all, it's a proper RDBMS..
0
 

Expert Comment

by:CarCo
ID: 13063333
i think i will follow your advice and start exploring MySQL :)
0
 

Expert Comment

by:rob-norton
ID: 13063340
You won't regret it :)
0
 
LVL 37

Expert Comment

by:meverest
ID: 13063412
hey, if you are going to go the open source path, take a look at postgresql too - it's my preference over mysql any time.

cheers.
0
 

Expert Comment

by:CarCo
ID: 13063416
can u give me a tip of what exactly should i download from mysql site, with GUI and everythink?!
0
 

Expert Comment

by:rob-norton
ID: 13063460
Assuming you're going to run this on a Windows server, I recommend you download the MySQL Server (Windows Essentials package) from here: http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-essential-4.1.9-win32.msi/from/pick#mirrors

You'll also want the GUI for it from here: http://dev.mysql.com/get/Downloads/MySQLCC/mysqlcc-0.9.4-win32.zip/from/pick

Full instructions should be included to get you started.. best of luck :)
0
 

Expert Comment

by:CarCo
ID: 13063471
Thank  a lot again for everyhing!! wont bother u anymore today :))!

big thanks
0
 
LVL 4

Author Comment

by:Thirt
ID: 13063857
I would just add that MS SQL Server would be a better path for someone familar with Access. The Enterprise Manager GUI tools are better suited to allow one to start using something like this off the shelf. You can build queries in the same manner as you did in Access and it builds the SQL for you.  Get the full blown Dev version to see all the tools available before you commit to anything else. And if licensing $$ is an issue, go with MS SQL MSDE.

I've been forced here at work to start using PostGreSQL, and while it will work as an enteriprise database back end, and yes it's free, it's been a total pain in the a$$.
0
 

Expert Comment

by:CarCo
ID: 13063938
ah! good tip!

I already downloaded and started using mysql with the GUI u recomended..., so far im ok and still getting familiar with it! Also enjoying it ...!! :))

If i see i will have problems with it that i can't solve, then i will consider changing to MS SQL.

My knowledge in DB software is pretty low, but im starting to get interested with it. I see that u have quite a large background knowledge of this issue...
Hope u will help me in the problems i will for sure encounter in my long way to consider myself an expert in this, (if i ever reach it :) )!!


uh! that PostGreSQL name seems awfull! Must have been taken from an horror movie...
0
 

Expert Comment

by:rob-norton
ID: 13064014
It's worth mentioning here that if you use SQL MSDE to run a website you are only licensed for up to 25 concurrent users. MySQL & PostGre have no such restriction.
0
 

Expert Comment

by:CarCo
ID: 13064052
one more question!

is mysql compatible with asp??
0
 

Expert Comment

by:rob-norton
ID: 13064078
Indeed it is, I wouldn't have suggested it otherwise. I've developed many large web applications using all combinations of ASP, PHP, ASP.Net and Access, MySQL, PostGre and MS SQL Server..
0
 
LVL 4

Author Comment

by:Thirt
ID: 13064094
Good point on the limitation with MSDE.
0
 

Expert Comment

by:CarCo
ID: 13064527
this is getting serious!!

What drivers do i have to use in order to connect ASP to my MySQL database??
0
 

Expert Comment

by:rob-norton
ID: 13064561
Sorry I neglected to mention, you'll need the MyODBC driver package from here: http://dev.mysql.com/get/Downloads/MyODBC3/MyODBC-3.51.10-2-win.exe/from/pick

Connection string look like this:

"Driver={MySQL ODBC 3.51 Driver}; Database=<db_name>; Server=<db_server>; UID=<user_id>; Password=<password>;"
0
 

Expert Comment

by:CarCo
ID: 13064843
thnks one more time rob!!

hope i will be able to compensate u with my knowledge one day...

p.s. by the way, my access database is working properly now... ( what da heck...?!)
0
 

Expert Comment

by:CarCo
ID: 13065385
hi again rob!

can u help me in one more charade please!?

I am for hours trying to use the appropriate connection string to my database and none seems to work, apart from the error messages i get from putting some valours wrong, wheneer i seem to put it all good, i get the message: catastrophic failure!!

Do u have an answer for this problem?

im using dreamweaver MX and MySQL
0
 

Expert Comment

by:rob-norton
ID: 13070439
Never had this error myself but a quick search on Google turned up a few matches. I'm sure if you dig around you will find the answer:

http://forums.mysql.com/read.php?11,5080,5080#msg-5080

http://www.kofler.cc/forum/forumthread.php?rootID=3802

Best of luck..
0
 

Expert Comment

by:CarCo
ID: 13071771
today im also an happy man!

For meeting a nice person as u that helps me a lot and also cause i also solved my connection problems thanks to the forum links u tiped me...

My problem was in the ODBC driver version, the 3.51.10 was not working for me as well as for some other ppl, so i changed it for the .9 and its working fine now!!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) (http://technet.microsoft.com/en-us/library/cc758834(WS.10).aspx) is a much better solution when you need to p…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

759 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

14 Experts available now in Live!

Get 1:1 Help Now