Link to home
Start Free TrialLog in
Avatar of Thirt
Thirt

asked on

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?

Avatar of meverest
meverest
Flag of Australia image

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.
Avatar of gexen
gexen

Is there an .ldb file?  If not, then either the permissions are wrong or your database is corrupt.
ASKER CERTIFIED SOLUTION
Avatar of MarcRosenberg
MarcRosenberg

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 Thirt

ASKER

Thanks for the help Meverset, but I doubled checked the temp values. Looks like MR nailed it.
Add the anonymous internet user account to the local system adminstrator group?! Hardly a solution for a production server is it?
Mr. Norton... your point is made. Have you another solution?
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
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.
Rob... thanks man.. this is really going to help me out when I do an install later this month.
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.
Avatar of Thirt

ASKER

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.
Done.. thanks for the suggestion... its waiting out there for your Rob.
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.
Avatar of Thirt

ASKER

opps, appears it got kaboshed bye the admin.
https://www.experts-exchange.com/questions/21199200/Points-for-rob-norton.html

(I clicked on marc's username, and viewed his log of questions.)
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
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!!
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.
hmmm! thats a good point!

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

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

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

big thanks
Avatar of Thirt

ASKER

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$$.
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...
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.
one more question!

is mysql compatible with asp??
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..
Avatar of Thirt

ASKER

Good point on the limitation with MSDE.
this is getting serious!!

What drivers do i have to use in order to connect ASP to my MySQL database??
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>;"
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...?!)
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
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..
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!!