Access DB Connection/ASP
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=23670
Printed Date: 28 March 2026 at 5:51am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Access DB Connection/ASP
Posted By: Dirty_Josh
Subject: Access DB Connection/ASP
Date Posted: 04 July 2007 at 3:06am
I'm new here and new to the whole ASP/Access thing. I have been trying to build a login paqe on my site to alow users to login to a unique page for that user.
I started off trying a couple of tutorials and walk-thrus and kept coming up with errors on my page. A friend that knows a bit about ASP and Access has been trying to help me and sent me to a tutorial on here for a guestbook just to get the basic ASP in there and get a connection through the db. I've attempted a DSN-less and system DSN connection and both have returned errors. The last one I tried (on the guestbook) was DSN-less. I received "unable to open registry key". I found a fix for the error on this site and it said to put in the actual path to the db and not the virtual path. So, I changed the path and got an error saying that the virtual path is required and I've entered a phsical path - lol. So, I'm in a loop and not sure what to do.
It seems that the most common error I receive is the "unable to open registry key". I've set a lot of permissions around the server. I have admin access to the box so changing them over and again isn't a big deal.
Anyone have any insight into what I need to do?
|
Replies:
Posted By: michael
Date Posted: 05 July 2007 at 4:33pm
Make sure the IUSR_Comutername has mofidy rights to the datbases' folder location.

------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
Posted By: Dirty_Josh
Date Posted: 05 July 2007 at 9:41pm
I gave modify perms to the folder containing the db and it's returning:
General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xe28 Thread 0x738 DBC 0x328527c Jet'.
/guestbook.asp, line 17
Line 17 is:
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
Still the same error.
|
Posted By: michael
Date Posted: 05 July 2007 at 10:04pm
Then verify what user your Web/Virtual Directory is running under. It is a permission problem. Also make sure that the connection string is actually pointing correctly.

------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
Posted By: Dirty_Josh
Date Posted: 05 July 2007 at 11:10pm
|
IUSR_ is the user for IIS to run under. It has modify on the folder containing the db which also gives the db modify for that user. Are there any other permissions that I need to check on any other folders?
|
Posted By: michael
Date Posted: 06 July 2007 at 3:11pm
Not really. Try to set a complete path in the connection string like DBQ=c:\blah\database.mdb"

------------- http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker
|
Posted By: Dirty_Josh
Date Posted: 06 July 2007 at 11:19pm
I have attempted to change
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
to
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\joshb\www\guestbook.mdb" & Server.MapPath("guestbook.mdb")
and also to
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\joshb\www\guestbook.mdb"
and all returns the same error I have been getting.
|
Posted By: michael
Date Posted: 09 July 2007 at 2:27pm
Well, I personally have never seen this error with anything but permissions problems. Try to run AccessEnum from MS(Sysinternals) @ http://www.microsoft.com/technet/sysinternals/Security/AccessEnum.mspx and it will tell you what user has access to where. Alternatively you can run FileMon to see where you get the access denied. Btw. As you have the DB in the www folder you might have to enable write permissions in the web iteself.. not sure about that.

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