-
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?
-
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.
-
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.