Results 1 to 3 of 3

Thread: mdb-file in readonly directory

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    35

    Question

    When I try to open an access database using vb6 and
    jet 3.51 the following error is raised:

    3051; The Microsoft Jet database engine cannot open the file '\\SERVER1\DIR\TESR.MDB'. It is already opened exclusively by another user, or you need permission to view its data.

    That is because I only have read permission for the directory where the mdb is located. The file does not have a readonly flag. Once I opened the mdb with Access 97, the error no longer occurs.

    How can I get this behaviour without using access?

    rfo

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    Are you opening the database using Automation?

    By default Access will open for exclusive use. This requires Read/Write. You need to open the database for shared access - there are options to set in the OpenDatabase call. Check it out in Access help. It will give a better explanation than I can.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Posts
    35
    That's how I open the database! I don't
    have a drive mapping.

    Code:
    Set db(0) = OpenDatabase("\\SERVER1\ORCAONL\test4readonly\ROT.mdb", False, True)
    paulw recommended to check the Access helpfile, but I couldn't find anything about that.

    rfo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width