Link to home
Start Free TrialLog in
Avatar of coopa
coopa

asked on

General error Unable to open registry key

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... ?
Avatar of hongjun
hongjun
Flag of Singapore image

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

hongjun
Avatar of coopa
coopa

ASKER

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;"
Try this
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\testing\db\db.mdb") & ";Password=password;"

hongjun
Sorry some mistake.

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

hongjun
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
Avatar of coopa

ASKER

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
That is permission. Check that the file is not readonly and also make sure that you have write permission.

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

hongjun
Avatar of coopa

ASKER

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 ?
Is your mdb file corrupted?

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

hongjun
Avatar of coopa

ASKER

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

ASKER

Thanks for your help.
You'll get the points if I solve this using your advice.
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.  
webwoman, exactly correct. Check permissions.

hongjun
Avatar of coopa

ASKER

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

ASKER

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 ?
ASKER CERTIFIED SOLUTION
Avatar of hongjun
hongjun
Flag of Singapore image

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 coopa

ASKER

Installed the latest version on my computer, still get the same error.  Database is fine, I even tried removing the password... no effect.
Avatar of coopa

ASKER

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.

Avatar of coopa

ASKER

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.

Avatar of coopa

ASKER

"I checked this with the microsofy utility"
By this I meant "ComCheck".