Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access database locked?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access database locked?

 Post Reply Post Reply
Author
Hyarmion View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hyarmion Quote  Post ReplyReply Direct Link To This Post Topic: Access database locked?
    Posted: 23 October 2008 at 3:06am
I am working my way thru the Web Wiz ASP tutorials and am up to the one about adding data to an MS Access database, but when my program attempts to open the ADO coonection I get this error:

  • Error Type:
    Microsoft JET Database Engine (0x80004005)
    The Microsoft Jet database engine cannot open the file 'c:\myhtml\guestbook.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
    /myhtml/Add_to_Guestbook.asp, line 10

    I am using a datalink (i.e a .udl file) rather than a connection string to access the database as that is what I have always done with VB. The "Test Connection" button on the datalink works fine.

  • There is no other user or program accessing the Access database. This is a standalone Windows XP Pro machine with IIS installed on it, so no network. And I restarted the machine to make sure there was no other process with a lock on the database.

    Can anyone help.

    Back to Top
    123Simples View Drop Down
    Senior Member
    Senior Member
    Avatar

    Joined: 08 July 2007
    Location: United Kingdom
    Status: Offline
    Points: 1192
    Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2008 at 6:37am
    Make sure the Access file is not ReadOnly
    Back to Top
    Hyarmion View Drop Down
    Newbie
    Newbie


    Joined: 23 October 2008
    Status: Offline
    Points: 8
    Post Options Post Options   Thanks (0) Thanks(0)   Quote Hyarmion Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2008 at 7:35am
    How exactly do I do that, are you referring to internal Access security or external file security?
    Back to Top
    WebWiz-Bruce View Drop Down
    Admin Group
    Admin Group
    Avatar
    Web Wiz Developer

    Joined: 03 September 2001
    Location: Bournemouth
    Status: Offline
    Points: 9844
    Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2008 at 9:34am
    Right click the folder the database is in and choose properties. From the security tab make sure that the computers IUSR account has read, write, and modify permissions.
    Back to Top
    Hyarmion View Drop Down
    Newbie
    Newbie


    Joined: 23 October 2008
    Status: Offline
    Points: 8
    Post Options Post Options   Thanks (0) Thanks(0)   Quote Hyarmion Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2008 at 11:19pm
    Approve Actually there is no IUSR listed, but there is a User so I ticked it's write permisssion and everything is working fine now. Thanks very much.
    Back to Top
    WebWiz-Bruce View Drop Down
    Admin Group
    Admin Group
    Avatar
    Web Wiz Developer

    Joined: 03 September 2001
    Location: Bournemouth
    Status: Offline
    Points: 9844
    Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2008 at 9:05am
    Giving all users (which is what you have done) these permissions can be dangerous.

    You need to add the IUSR_<machine_name> to the permissions for the folder and give that read, write, and modify permission.
    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.