How do I enable multi-user access to an Access database?
I have a billing application written in C# that uses an Access database (.mdb file) for storage. I'd like the application to support multiple users sharing access to the database but this fails with an error message similar to
The database has been opened exclusively by another user, or you do not have permission to open it
What do I do to al开发者_开发百科low multiple users to access the file?
if you really have to do it (and shame on you for using access to that) you have to realize access is FILE BASED.
Basically, you connect to the database file (using a driver), so to allow multiple concurrent users you must have a network in place with a file share on which you put the database. And you need to make sure your database is opened in a way allowing multi user access. I think I remember this being a setting on the database or something, that then forced it to create some lock file.
THAT SAID: move to SQL Server, Access starts really showing negative sides the moment you go network/multi user. It is discouraged by Microsoft for about 10 years now. This is one reason I think I remember - I stopped doing access multi user 15 years ago because it made no sense.
精彩评论