title: The database cannot be opened because it is version 851. This server supports version 782 and earlier. A downgrade path is not supported
body: <p>I am trying to attach database file in SQL Server. I am getting the below error. The same error I am getting while trying to attach database from Visual Studio. I am using Visual Studio 2013 and SQL Server 2014 Management Studio.</p>
  
  <p>My connection string:</p>
  
  <pre><code>&lt;add name="Sample"  
       connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\M\Desktop\SampleApplication1\App_Data\Sample.mdf;Initial Catalog=SampleDBContext;Integrated Security=True;" 
       providerName="System.Data.SqlClient"/&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>The database 'sample' cannot be opened because it is version 851. This server supports version 782 and earlier. A downgrade path is not supported. Could not open new database 'Sample'. CREATE DATABASE is aborted.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/4CPBY.png"><img src="https://i.stack.imgur.com/4CPBY.png" alt="enter image description here"></a></p>
  
  <p>and here is the default SQL Server instance is set in Visual Studio.</p>
  
  <p><a href="https://i.stack.imgur.com/APbI5.png"><img src="https://i.stack.imgur.com/APbI5.png" alt="enter image description here"></a></p>