[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:



   I have a lot of users using the same MBD file connected via a ODBC connector and when I have a lot of require I get the error. Did you have any idee?

System.Data.Odbc.OdbcException: ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
   at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.Odbc.OdbcConnection.Open()
  • 2
2 Solutions
That's MS Access, which acts as file access. If another user is updating, the file is locked.
I recommend to move to another database e.g. MSSQL or MySql which has full features of DBMS.

If still need to use access, try to do try catch block around the OdbcConnection.Open() to prevent system hang, then inform user it out of service so try again.
Also is the DB setup for shared access?
Did someone open it exclusively?
SylvainBissonnetteAuthor Commented:
Thanks for the information,  No there is no one who open the DB in exclusive mode.  I never had work with MSSQL is it very complicated to install a access DB in MSSQL and access it via a ODBC connector?.  I don't really need all the functionality of MSSQL is there a small SQL for dummy?

You could use SQL server Express

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now