• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10873
  • Last Modified:

Microsoft Jet database engine cannot open the file

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
Thirt
Asked:
Thirt
  • 18
  • 17
  • 5
  • +3
1 Solution
 
meverestCommented:
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
 
gexenCommented:
Is there an .ldb file?  If not, then either the permissions are wrong or your database is corrupt.
0
 
MarcRosenbergCommented:
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ThirtAuthor Commented:
Thanks for the help Meverset, but I doubled checked the temp values. Looks like MR nailed it.
0
 
rob-nortonCommented:
Add the anonymous internet user account to the local system adminstrator group?! Hardly a solution for a production server is it?
0
 
MarcRosenbergCommented:
Mr. Norton... your point is made. Have you another solution?
0
 
rob-nortonCommented:
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
 
rob-nortonCommented:
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
 
MarcRosenbergCommented:
Rob... thanks man.. this is really going to help me out when I do an install later this month.
0
 
MarcRosenbergCommented:
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
 
ThirtAuthor Commented:
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
 
MarcRosenbergCommented:
Done.. thanks for the suggestion... its waiting out there for your Rob.
0
 
rob-nortonCommented:
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
 
ThirtAuthor Commented:
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
 
CarCoCommented:
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
 
CarCoCommented:
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
 
meverestCommented:
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
 
CarCoCommented:
hmmm! thats a good point!

Is there a way to go around that security problem and making the database function properly ??
0
 
rob-nortonCommented:
See my comments above, starting 11/05/2004.
0
 
CarCoCommented:

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
 
CarCoCommented:
i can only give access to one of them! :(
0
 
rob-nortonCommented:
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
 
CarCoCommented:
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
 
rob-nortonCommented:
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
 
CarCoCommented:
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
 
rob-nortonCommented:
Glad to be of assistance :)
0
 
CarCoCommented:
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
 
rob-nortonCommented:
Are you using MS Access?
0
 
rob-nortonCommented:
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
 
CarCoCommented:
:))

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
 
rob-nortonCommented:
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
 
CarCoCommented:
i think i will follow your advice and start exploring MySQL :)
0
 
rob-nortonCommented:
You won't regret it :)
0
 
meverestCommented:
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
 
CarCoCommented:
can u give me a tip of what exactly should i download from mysql site, with GUI and everythink?!
0
 
rob-nortonCommented:
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
 
CarCoCommented:
Thank  a lot again for everyhing!! wont bother u anymore today :))!

big thanks
0
 
ThirtAuthor Commented:
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
 
CarCoCommented:
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
 
rob-nortonCommented:
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
 
CarCoCommented:
one more question!

is mysql compatible with asp??
0
 
rob-nortonCommented:
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
 
ThirtAuthor Commented:
Good point on the limitation with MSDE.
0
 
CarCoCommented:
this is getting serious!!

What drivers do i have to use in order to connect ASP to my MySQL database??
0
 
rob-nortonCommented:
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
 
CarCoCommented:
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
 
CarCoCommented:
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
 
rob-nortonCommented:
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
 
CarCoCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 18
  • 17
  • 5
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now