Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access DB Connection/ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access DB Connection/ASP

 Post Reply Post Reply
Author
Dirty_Josh View Drop Down
Newbie
Newbie
Avatar

Joined: 04 July 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dirty_Josh Quote  Post ReplyReply Direct Link To This Post Topic: Access DB Connection/ASP
    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?
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2007 at 4:33pm
Make sure the IUSR_Comutername has mofidy rights to the datbases' folder location.
Back to Top
Dirty_Josh View Drop Down
Newbie
Newbie
Avatar

Joined: 04 July 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dirty_Josh Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Dirty_Josh View Drop Down
Newbie
Newbie
Avatar

Joined: 04 July 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dirty_Josh Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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"
Back to Top
Dirty_Josh View Drop Down
Newbie
Newbie
Avatar

Joined: 04 July 2007
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dirty_Josh Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.