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.
My connection string:
<add name="Sample"
connectionString="Data Source=(LocalDB)MSSQLLocalDB;AttachDbFilename=C:UsersMDesktopSampleApplication1App_DataSample.mdf;Initial Catalog=SampleDBContext;Integrated Security=True;"
providerName="System.Data.SqlClient"/>
Error:
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.
and here is the default SQL Server instance is set in Visual Studio.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…