tags:

views:

56

answers:

5

Hi all,

I have an Access database stored on PC A, and an application located on PC B and C. When the application loads the data from the database, the error message "The Microsoft Jet database engine cannot open the file '\xxx.xxx.xxx.xxx\FolderName\Test.mdb'. It is already opened exclusively by another user, or you need permission to view its data." appears. However, if I open the database file by browsing from PC B one time and close it, the application can load the data without error and so the same as PC C.

The PCs are linked in peer to peer, and the app is desktop application. Could anyone give me any solution to load the data without opening the database file once?

Thank you.

+1  A: 

This could be due to the application not closing properly the last time it was used. Check to see if there is an ldb (lock file) in the same directory as the database. Open it with a text editor and you can see who the last person to use the db was. If the db was not closed properly it may still be locked.

Joe Philllips
However if multiple people have been in the database at the same time this won't be useful as you will see multiple PCs in the LDB file with no idea as to which was the last one in. Also this seldom happens and typically only when Access crashes or the PC is BSODed or abruptly powered off.
Tony Toews
A: 

sharing an Access database on a network (MDB)

To share an access database, just place the *.MDB file into a network share and open it across the network.

adatapost
I already put the DB file into a network, but when the app accessed, the error msg appears (see above). I have to open the DB once, then the app can access. I set the security to Everyone (Read, Write) in the property of the database file.
Sambath
A: 

The description seems to indicate that the latter part of the Microsoft message applies: "...or you need permission to view its data". The manual opening of the MDB file has the effect of setting the proper account credentials vis-a-vis the PC A, which then allow the application to run normally and the the mdb file as it sees fit.

mjv
+1  A: 

On a peer to peer network you need to set the permissions to Full control. Users need to be able to create and delete the LDB file. On a file server the detailed permissions would be something like read, write, create and delete.

Tony Toews
They don't need to be able to delete the LDB file, though that does allow a corrupted LDB to be deleted by users transparently. Remember that without DELETE permission, the LDB will be handled just exactly the way it was before Jet 3, i.e., the LDB file was left on the drive after everyone had closed out of it, and not deleted.
David-W-Fenton
Yes but <smile> I like being neat and tidy and having the LDB file deleted as the last user exits the BE database file Not necessary I agree.
Tony Toews
A: 

This sounds like a networking issue to me. If you've linked your table with a UNC name (apparently using an IP address, which is pretty inadvisable, unless it's a hardwired IP address that can't change), that's good, but a mapped drive can have one advantage if you set it to reconnect at logon (instead of reconnecting only when data on it is requested), and that is that the connection to the "server" PC is already initialized at the time you first request it through Access. If it's not, it can cause slowdowns and erroneous error messages.

Another option would be to add in the Autoexec.bat of the client PCs:

  NET USE \\xxx.xxx.xxx.xxx\FolderName

You don't have to map it to to a drive letter, just declare it as available. This would accomplish the same thing as an auto-reconnecting mapped drive, but there is no GUI for setting it up (as there is with mapping a drive).

David-W-Fenton