Cannot be opened because it is version 852. this server supports version 782 and earlier(852版本打不开.本服务器支持782及更早版本)
问题描述
我正在使用 Visual Studio 2017 和 SQL Server 2014.在将数据库文件附加到 Visual Studio 时,我收到此错误:
I am using Visual Studio 2017 and SQL Server 2014. While attaching a database file to Visual Studio, I get this error:
""
升级文件后我使用了这个连接字符串
After upgrading the file I used this connection string
<connectionStrings>
<add name="con"
connectionString="Data Source=(LocalDB)MSSQLLocalDB;AttachDbFilename=|DataDirectory|inaaelmamorra.mdf;Integrated Security=True;Connect Timeout=30"/>
</connectionStrings>
它在我的机器上运行良好,但在客户端机器上,弹出一个错误提示
It's working fine on my machine, but on the client machine, an error pops up saying
无法打开,因为是852版本.本服务器支持782及更早的版本
Cannot be opened because it is version 852. This server supports version 782 and earlier
虽然我在客户端安装了 SQL Server 2016 本地数据库,但我仍然无法摆脱它.
Though I installed SQL Server 2016 local DB on the client side, I still can't get rid of it.
我的第二个问题是:数据库文件不兼容的SQL Server当前实例是什么?
My second question is: what is the current instance of SQL Server to which the database file is not compatible?
推荐答案
这对我有用:
打开命令提示符并输入:
open command prompt and type :
cd "C:Program FilesMicrosoft SQL Server130LocalDBBinn"
在cmd中运行此命令删除本地数据库:
Run this command in cmd to delete the local db :
SqlLocalDB.exe delete "MSSQLLocalDB"
(或 SqlLocalDB.exe 停止MSSQLLocalDB"
,如果您收到实例仍在运行的错误)
(or SqlLocalDB.exe stop "MSSQLLocalDB"
, if you get an error of intance still running)
然后输入此命令以创建本地数据库的新更新实例:
Then type in this command to create a new updated instance of local db :
SqlLocalDB.exe create "MSSQLLocalDB"
参考:https://www.youtube.com/watch?v=bCjc9Mmx-bM
这篇关于852版本打不开.本服务器支持782及更早版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:852版本打不开.本服务器支持782及更早版本


- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- 带问号的 nvarchar 列结果 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01
- 在 C# 中异步处理项目队列 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- 使用 rss + c# 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01
- 在 LINQ to SQL 中使用 contains() 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01