Print Page | Close Window

Unable to open registry key

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13990
Printed Date: 30 March 2026 at 3:03pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Unable to open registry key
Posted By: Darxide
Subject: Unable to open registry key
Date Posted: 24 February 2005 at 7:58pm
I know this is a common error, but I searched the forums and got so many hits I tried to wade through them but just couldn't find a solution. I'm new to ASP and am currently testing it on my own computer ( http://localhost - http://localhost ).
 
I'm working with the database tutorial ( http://www.webwiz.net/asp/tutorials/connecting_to_a_database_pt2.asp - http://www.webwiz.net/asp/tutorials/connecting_to_a_database_pt2.asp )
 
I keep getting the error:
 
General error Unable to open registry key 'Temporary (volatile) Jet DSN (...)' on line 10, and Line 10 reads like this:
 
adoCon.OPEN "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
 
the guestbook.mdb file is located in c:\Inetpub\wwwroot
 
some of the solutions that I found were to change the line to:
 
adoCon.OPEN "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="c:\Inetpub\wwwroot\guestbook.mdb"
 
but that didn't work either.
 
I appreciate any help.
 
Thanks,
~Darxide
 


-------------
Sometimes I wish real life had a logout button.



Replies:
Posted By: michael
Date Posted: 24 February 2005 at 9:06pm
Make sure that the IUSR_Machinename account has write permssions to the location where the db is.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Darxide
Date Posted: 26 February 2005 at 11:28pm

That was the problem.

Thanks Michael
 
~Darxide


-------------
Sometimes I wish real life had a logout button.


Posted By: Darxide
Date Posted: 27 February 2005 at 12:27am
Ok, here's my new problem.
 
I got to the part about deleting entries. What I did was moved the database to a private directory outside of the wwwroot directory. It is now in C:\Inetpub\Databases and reading and adding works just fine. I'm getting this error while trying to delete:
 
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables.
/delete_entry.asp, line 17
and this is the complete delete_entry.asp file:
 
<%
Dim adoCon
Dim rsDeleteEntry
Dim strSQL
Dim lngRecordNo
lngRecordNo = CLng(Request.QueryString("ID"))
set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("..\Databases\guestbook.mdb")
Set rsDeleteEntry = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblComments.* From tblComments WHERE ID_no=" & lngRecordNo
rsDeleteEntry.LockType = 3
rsDeleteEntry.Open strSQL, adoCon
rsDeleteEntry.Delete
rsDeleteEntry.Close
Set rsDeleteEntry = Nothing
Set adoCon = Nothing
Response.Redirect "delete_select.asp"
%>
 
 
It can't be anything to do with permissions since I can add to the database just fine.
 
Thanks,
~Darxide


-------------
Sometimes I wish real life had a logout button.


Posted By: Darxide
Date Posted: 27 February 2005 at 3:00am

Ok, I'm getting upset here. Now I can't even add to the database. It's saying it's read only and I can't add/delete/update but I can read from it just fine. The database is now outside of the wwwroot directory located in C:\Inetpub\Databases. So how do I give this directory write permissions since it's outside of the wwwroot directory and the Personal Web Manager doesn't reach outside of wwwroot? Or do I have to move it back into the wwwroot directory? If I have to move the directory to C:\Inetpub\wwwroot\Databases but at the same time make it NOT readable to external sources (a user browsing my site couldn't access the directory nor any of the contents. They don't even know this directory exists.

 
I've never worked with a Windows 2000 server before. It's always been Linux, so I really don't know anything about setting up Win2k.
 
Thanks,
~Darxide


-------------
Sometimes I wish real life had a logout button.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net