Re: "unable to lock database"

From: Chris Barber (chris_at_blue-canoe.co.uk.NOSPAM)
Date: 05/01/04


Date: Sat, 1 May 2004 23:53:09 +0100

The Jet engine creates a lock file to hold reference to each user that has a connection open to the
database. Open an MDB with more than two machines and then examine the .ldb in notepad and you'll
see the names of the machines in there!
Even with a 'read-only access to a table the .ldb is still created since it has nothing to do with
the lock type. It's purely associated with open connections.

Chris.

"Jerry Spence" <1@2.com> wrote in message news:ykVkc.38091$Y%6.5236788@wards.force9.net...
Thanks Chris - That's a good clue. I'll check the file creation rights in
the folder. As an aside though, why is my program trying to lock it anyway?
Surely that means no one else will be able to get to it, which is not quite
the idea. Should I be opening it "no lock" somehow?

Jerry

"Chris Barber" <chris@blue-canoe.co.uk.NOSPAM> wrote in message
news:eTRJADqLEHA.2660@TK2MSFTNGP09.phx.gbl...
> Usually implies that the user context doesn't have the relevant security
rights to create the .ldb
> file in the same folder as the .mdb.
>
> Chris.
>
> "Jerry Spence" <1@2.com> wrote in message
news:Xdpkc.37573$Y%6.5157559@wards.force9.net...
> This problem may cut accross a couple of feeds so I'll try this one first:
>
> I have some VB which opens a database file. The enviornment is XP Pro on a
> domain, and the Access database is on a client and needs to be accessed by
> other clients.
>
> I am opening the database as follows:
>
> dbName = "c:\program files\mydatabasefolder\edds.mdb"
> Set db = OpenDatabase(dbName)
>
> I have set up shares and rights to this folder and database. If I am
> administrator on another PC then all is well. If I am an ordinary user,
then
> I get the error message "unable to lock database". If I am an ordinary
user,
> but a member of administrators then I still get the same error. It only
> works if I am actually logged on as administrator.
>
> At this point I thought it was something I was not doing in VB in terms of
> opening the file. However if I come out of my software and go into Access
on
> the remote machine as administrator I can open the database OK. If I am an
> ordinary user (even as member of administrators) I get the same error
> message.
>
> Any ideas?
>
> Jerry
>
>
>



Relevant Pages

  • Re: Prevent database open if already open by a user
    ... I forgot to mention in my previous post that the filed Lock is updated to YES ... soon as the first user opens the database. ... this lock during the close operation, when the user exits the database. ... it does not prevent the DB from opening or operating. ...
    (microsoft.public.access.modulesdaovba)
  • VB6 3260 error with Access 2002
    ... In order to "lock" the job a ... I have a dummy table in the database which I open ... This has been working for many years in hundreds of installations ... and opens another of my applications that uses the same database (and ...
    (microsoft.public.vb.database)
  • VB6 3260 error with Access 2002
    ... In order to "lock" the job a ... I have a dummy table in the database which I open ... This has been working for many years in hundreds of installations ... and opens another of my applications that uses the same database (and ...
    (comp.lang.basic.visual.database)
  • VB6 3260 error with Access 2002
    ... In order to "lock" the job a ... I have a dummy table in the database which I open ... This has been working for many years in hundreds of installations ... and opens another of my applications that uses the same database (and ...
    (microsoft.public.vb.database.dao)
  • Exclusive Access warning 8 times
    ... I just created user-level security for my FE database, when I log on as the ... administrator everything opens fine. ...
    (microsoft.public.access.security)