Microsoft – Access Database Viewer

Background

Have a database that I need to review.

Unfortunately it is a Microsoft Access Database and I do not have Access installed.

And, so googled for opportunities.

Sample Databases

You likely want to try things out against sample databases before hand.

Here are some sample databases that are available online.

  • Microsoft Office Access 2010
    • Links
      • Download Sample Databases
        Link

 

Tools

Here are some sample databases that are available online.

  • Online
    • Maklabu GmbH
      • MDB Opener
  • Desktop
    • Alex Nolan
      • MDB Viewer Plus

Error :- The Microsoft Access database engine cannot open or write to the file. It is already opened exclusively by another user, or you need permission to view and write its data.

Background

Debugging an application and thankfully I have managed to add good exception handling.

Error

Here is the error message :-

Error Image

err_20181203_0532PM

Error Text


Attempt to connect to Provider = Microsoft.ACE.Oledb.12.0;User ID = Admin;Data Source=\\hrdb\payroll\payroll.mdb failed.
Exception Type is System.Data.OleDb.OleDbException
Exception Message is The Microsoft Access database engine cannot open or write to the file '\\hrdb\payroll\payroll.mdb'. It is already opened exclusively by another user, or you need permission to view and write its data.
Error Code is -2147467259
Error Source is Microsoft Access Database Engine
Error Inner Exception is
Stack Trace is at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.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.OleDb.OleDbConnection.Open()
at intc.svc.timer1_Elapsed(Object sender, ElapsedEventArgs e) in C:\\Service1.cs:line 339

Remediation

I watched the connection string over and over.  Installed the Database Connectivity driver and no good.

Finally, I accepted the error message.

Error Message :-

The Microsoft Access database engine cannot open or write to the file ‘\\hrdb\payroll\payroll.mdb’. It is already opened exclusively by another user, or you need permission to view and write its data.
Error Code is -2147467259.

The keyword is need permission to view and write.

The contextual user did not have the permission needed.