Solved

General error Unable to open registry key

Posted on 2001-08-08
23
652 Views
Last Modified: 2012-08-14
Getting the following error When trying to connect to an MS Access 2000 database on a Win2000 server with this connection string:

objConn.Open "DBQ=" & Server.Mappath("\testing\db\db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" & "Password=password;"

-------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xb8c
-------------------------------------------------

Have tried fiddling with regedt32 changing the permissions of HKLC\SOFTWARE\ODBC, with no luck, not sure which user should have the write permissions, assumed it should be IUSR_MACHINE but still got the same error.

On another point I assumed that if I made the connection a System ODBC connection that it would solve the problem.
However this returned an error regarding file permissions... an error I still get no matter who has access permissions to the directory containing the database... help... What do I try now... ?
0
Comment
Question by:coopa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 11
23 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 6364252
Read this. Try to change your connection to OLEDB.
http://www.adopenstatic.com/faq/whyOLEDB.asp

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6364375
Just had a quick look at that article, sounds good, for testing issues, how would I change the following connection string ?

objConn.Open "DBQ=" & Server.Mappath("\testing\db\db.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
& "Password=password;"
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364399
Try this
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\testing\db\db.mdb") & ";Password=password;"

hongjun
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:hongjun
ID: 6364401
Sorry some mistake.

Try this
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("testing/db/db.mdb") & ";Password=password;"

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364410
If you still get errors, check to make sure that you have MDAC v2.1 SP2 or later installed on your server. To get the latest MDAC goto http://www.microsoft.com/data

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6364416
I get this:
-----------------------------------------------
Microsoft JET Database Engine error '80004005'

Unspecified error
-----------------------------------------------

Cant update the server for now as it's running live and I wont be able to restart
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364428
That is permission. Check that the file is not readonly and also make sure that you have write permission.

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364438
Make sure that you have latest MDAC installed. Download at http://www.microsoft.com/data

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6364444
Server is 2000 SP2 so definately has latest MDAC.  Must be permissions then, but that's what I assumed in the first place and tried adding full permissions for IUSR_MACHINE.

This had no effect.  What users needs to have write permissions ?
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364480
Is your mdb file corrupted?

Download ComCheck from http://www.microsoft.com/data to confirm your MDAC version.

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6364504
> Is your mdb file corrupted?
No, just checked in Access 2000, Ran a compression/repair.

Will have to check MDAC version tomorrow, but I still think this is most likely to do with file/folder permissions as none of the other db connection methods worked either.

I read on the microsoft site that the latest MDAC was included in SP1 so i'm pretty confident the server already has this.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364518
I am also very sure that it has to do with permission. Make sure not only the mdb file has the correct permission, but also the folder itself.

hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6364521
Good luck to you. I will be going to sleep now and will probably not going online tomorrow because tomorrow is Singapore's National Day. I am a Singaporean. A public holiday for me.

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6364528
Thanks for your help.
You'll get the points if I solve this using your advice.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6364626
The default internet user account has to have write permission on that directory. The folder/web needs to have script authorized, and I usually set the database to write access as well -- that I do with IIS on the server. Open IIS manager, open the tree for the site, open the folder where the mdb file is, RIGHT click on the mdb file in the RIGHT pane, select PROPERTIES and make sure you set it for read AND write... Then I go into Windows Explorer and make sure the IUSR account has write privileges on that folder, and on that file. Then it should work.  
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6366773
webwoman, exactly correct. Check permissions.

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6367066
Microsoft JET Database Engine error '80004005'

Unspecified error

-------------------------------------------------

This is a litte frustrating now.
I've followed the instructions perfectly, the IUSR account has read/write for the folder and read/write/modify/etc for the file.   Still the same error.
0
 
LVL 2

Author Comment

by:coopa
ID: 6367086
Used ComCheck and found some errors, looks like I need to install latest mdac.  However seeing as the server is currently running SQLserver 2000 I'm not sure I want to risk updating any data components.   How secure is this ?  How likely is this to cause problems as we have over 10 clients websites running on this ?
0
 
LVL 33

Accepted Solution

by:
hongjun earned 150 total points
ID: 6368517
Installing the latest version of MDAC is definitely to be safe.

hongjun
0
 
LVL 2

Author Comment

by:coopa
ID: 6368543
Installed the latest version on my computer, still get the same error.  Database is fine, I even tried removing the password... no effect.
0
 
LVL 2

Author Comment

by:coopa
ID: 6368555
Connection string:

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("db/db.mdb") & ";Password=password;"


Error on local machine (Win2000 Pro Latest MDAC)

Microsoft JET Database Engine (0x80040E4D)
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

0
 
LVL 2

Author Comment

by:coopa
ID: 6379610
I'm pretty sure there is a damaged version of MDAC installed - I checked this with the microsofy utility.  

However seeing as the box is live i'll have to update this later in the week.

Thanks all for your help and patience.

0
 
LVL 2

Author Comment

by:coopa
ID: 6379618
"I checked this with the microsofy utility"
By this I meant "ComCheck".
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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