title: Readonly connection string to an access database
body: <p>I'm trying to connect to an Access database file using a System.Data.OleDb.OleDbConnection.  I need to connect in readonly mode because another application uses it at the same time.  I can connect to the database in read/write no problem but can't seem to find anywhere the correct string for readonly.</p>
  
  <p>I've tried:</p>
  
  <p>Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=False;Mode=Read</p>
  
  <p>Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=False;Extended Properties="ReadOnly=true;"</p>
  
  <p>Thanks.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>(I should have put more information in the original question.)</p>
  
  <p>I could connect successfully to the access database when it was on the <em>local</em> machine, but when I tried connecting to the access database on a <em>remote</em> machine with the connection string</p>
  
  <pre><code>Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=False;Mode=Read
  </code></pre>
  
  <p>I would get the following error:</p>
  
  <pre><code>System.Data.OleDb.OleDbException (0x80004005): The Microsoft Office Access database engine cannot open or write to the file '{0}'. It is already opened exclusively by another user, or you need permission to view and write its data.
  </code></pre>
  
  <p>My application is running in a windows service under the local system account. </p>