cannot be opened because it is version 706. This server supports version 662 and earlier. A downgrade path is not supported

主宰稳场 提交于 2020-01-09 11:52:28

问题


When i am trying to run my website (with aspx) this problem comes up:

An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code

Additional information: The database 'C:\USERS\XXXX\DESKTOP\BERMAN\APP_DATA\DATABASE.MDF' cannot be opened because it is version 706. This server supports version 662 and earlier. A downgrade path is not supported.

Could not open new database 'C:\USERS\XXXX\DESKTOP\BERMAN\APP_DATA\DATABASE.MDF'. CREATE DATABASE is aborted.

An attempt to attach an auto-named database for file C:\Users\XXXX\Desktop\Berman\app_data\DataBase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

What to do?


回答1:


Looks like the Database.mdf file was created with a later version of SQL Server Express (2012) than the one installed on the server (2008). Upgrade the server with the latest version of SQL Server Express.




回答2:


If you’re trying to attach to a local db use LocalDb (since vs2012, sql2012), ie:

Data Source=(LocalDB)\v11.0;AttachDbFilename= (etc)


来源:https://stackoverflow.com/questions/19890891/cannot-be-opened-because-it-is-version-706-this-server-supports-version-662-and

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!