如何在Visual Studio 2015中解决.mdf数据库的版本问题? [英] How to solve the version problem for .mdf database in visual studio 2015?

查看:604
本文介绍了如何在Visual Studio 2015中解决.mdf数据库的版本问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了数据库问题,当我向数据库添加连接时,它说无法打开,因为它是版本852.this服务器支持版本782及更早版本。不支持降级路径。 / b>。请帮帮我...谢谢。



我尝试过的事情:



i试图安装SQL SERVER 2016这对我没什么帮助..

i have encountered with a database problem,when i am adding connection to the database it says"cannot be open because it is version 852.this server supports version 782 and earlier.A downgrade path is not supported. ". please help me...Thank You.

What I have tried:

i tried to install SQL SERVER 2016 Which did not helped me anything..

推荐答案

阅读错误信息:很清楚。

数据库是在Sql Server 2016或更高版本上创建的,而您的数据库服务器只是Sql Server 2014.



您可能尝试过安装Sql Server 2016,但是先卸载2014,和/或修改连接字符串以引用较新的服务器版本?
Read the error message: it's pretty clear.
The database was created on Sql Server 2016 or higher, and your database server is only Sql Server 2014.

You may have tried to install Sql Server 2016, but did you uninstall 2014 first, and / or did you modify the connection string to reference the newer server version?


另一个选项是不发送MDF文件,而是发送您执行的SQL在用户提供的服务器上创建数据库,所有表,列,关系,...所有,以及它需要的任何种子数据。
The other option is to not ship the MDF file but instead ship the SQL that you execute on the user supplied server to create the database, all the tables, columns, relationships, ... everything, and any seed data it needs.


我放弃了尝试使用来自Visual Studio的SQL Server ,因为每次更新都会带来麻烦和不兼容性。

它更容易使用 PostgreSQL Npgsql 驱动程序,你将不得不在代码中执行所有操作(或者使用ORM),但这比翻阅VS的所有文件要困难。生成,至少一切都可以在不同版本中运行。

这里有更多信息:搜索 [ PostgreSQL ]
I gave up trying to use SQL Server from Visual Studio, as every update gives trouble and imcompatibilities.
It's much easier to use PostgreSQL with the Npgsql driver, you will have to do everything in code (or use an ORM maybe) but that is less difficult than to plow through all the files that VS generates, and at least everything will work across different versions.
Here is some more information: Search[ PostgreSQL]


这篇关于如何在Visual Studio 2015中解决.mdf数据库的版本问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆