Search code examples
c#databasems-accessshared-directory

The database has been placed in a state by user 'Admin' on machine 'xyzusername' that prevents it being opened or locked


My application installed 250+ systems but the database(single) is shared in server machine. Which have every user read/write permission. some time I'm getting the above error from some systems.My purpose is collecting information from client systems and saving those information in server database. My database is Access Database. Someone guide me pls.


Solution

  • Access db supports a max of 255 concurrent connections. notice that this value is the maximum! it's usually much less than that (affected by the system's resources). If migrating to MSSQL [or other robust db platform] is not an option, I would recommend you to write a windows service (or other kind of process), which will run on the server, and manage all the database-related operations using some sort of locking mechanisms [e.g. Semaphores] to prevent exceeding the max supported concurrent connections