The database cannot be opened because it is version 782. This server supports version 706 and earlier. Downstream not supported

I created a sample database using SQL Server 2014 Express and added it to my Windows Form solution. When I double-click on it to open, I get this error.

The database cannot be opened because it is version 782. This server supports version 706 and earlier. Path down is not supported

I am using Visual Studio 2013. I really do not understand that I am using the last two versions of Microsoft products, and they are incompatible. Am I missing something? How to open this database?

enter image description here

+79
sql-server visual-studio
Oct 13 '14 at 18:36
source share
5 answers

Try changing Tools > Options > Database Tools > Data Connections > SQL Server Instance Name .

The default value for VS2013 (LocalDB)\v11.0 .

Switching to (LocalDB)\MSSQLLocalDB , for example, seems to work - it is no longer an error in version 782.

+131
Dec 01 '14 at 1:35
source share

Try changing the compatibility level. worked for me.

Check at what level he

 USE VJ_DATABASE; GO SELECT compatibility_level FROM sys.databases WHERE name = 'VJ_DATABASE'; GO 

Then make it compatible with the old version

 ALTER DATABASE VJ_DATABASE SET COMPATIBILITY_LEVEL = 110; GO 
  • 100 = Sql Server 2008
  • 110 = Sql Server 2012
  • 120 = Sql Server 2014

By default, Sql Server 2014 will only change the compatibility of db versions from 2014, using @@ version , which you must specify in which version of Sql Server.

Then run the command above to change its version.

An additional step: make sure that the database availability is not reset, do this by right-clicking on the properties of the folder and database. (make sure you have rights so that you do not deny access)

+9
Oct 13 '14 at 21:59
source share

For me, using the solution provided by codedom did not work. Here we can only change the compatibility version of the database exit.

But the actual problem is that the internal version of the database does not match due to changes in this storage format.

Read more about SQL Server version and their internal db version and Db compatibility level here. Therefore, it would be nice if you created your database using SQL Server 2012 Express or lower. Or start by previewing Visual Studio 2015.

+2
Nov 27 '14 at 8:44
source share

Another solution is to transfer the database to 2012, when you "export" the database from, for example, Sql Server Manager 2014. This is done in the "Tasks-> generate scripts when you right-click on DB. Just follow this instruction:

https://www.mssqltips.com/sqlservertip/2810/how-to-migrate-a-sql-server-database-to-a-lower-version/

It generates scripts with everything, and then in your SQL server manager, for example. 2012 run the script as instructed. I successfully completed the test.

+1
Nov 16 '16 at 10:04
source share

Sala.

This solution solves my problem: (from: https://msdn.microsoft.com/en-us/library/ms239722.aspx )

To permanently attach a database file (.mdf) from node data connections

  • Open the context menu for the data connection and select "Add New Connection".

    The Add dialog box appears .

  • Select the Change button.

    The Change Data Source dialog box appears .

  • Select Microsoft SQL Server and select the OK button.

    The Add Connection to Microsoft SQL Server (SqlClient) dialog box appears, displayed in the Data Source text box.

  • In the Server Name box, type or browse to the path to the local instance of SQL Server. You can enter the following:

    • "" for the default instance on your computer.
    • "(LocalDB) \ v11.0" for the default instance of SQL Server Express LocalDB.
    • ". \ SQLEXPRESS" for the default instance of SQL Server Express.

    For information about SQL Server Express LocalDB and SQL Server Express, see Local Data Overview .

  • Select Use Windows Authentication or Use SQL Server Authentication .

  • Select Attach Database File , Browse, and open an existing .mdf file.

  • Select the OK button.

    A new database appears in Server Explorer. It will remain connected to SQL Server until you explicitly disconnect it.

+1
May 21 '17 at 9:47 a.m.
source share



All Articles