|
-
Dec 4th, 2000, 04:55 AM
#1
Thread Starter
Member
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?
-
Dec 4th, 2000, 05:25 AM
#2
Fanatic Member
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...
-
Dec 4th, 2000, 06:07 AM
#3
Thread Starter
Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|