简体   繁体   English

asp.net SQL Server错误

[英]asp.net SQL server error

I am getting following error when I run my website on my laptop which i created on another computer 当我在另一台计算机上创建的笔记本电脑上运行网站时,出现以下错误

The database 'C:\\DOCUMENTS AND SETTINGS\\ASIF\\DESKTOP\\APP\\WEBSITE\\APP_DATA\\DB.MDF' cannot be opened because it is version 661. This server supports version 612 and earlier. 无法打开数据库“ C:\\ DOCUMENTS AND SETTINGS \\ ASIF \\ DESKTOP \\ APP \\ WEBSITE \\ APP_DATA \\ DB.MDF”,因为它是版本661。此服务器支持版本612和更早版本。 A downgrade path is not supported. 不支持降级路径。 Could not open new database 'C:\\DOCUMENTS AND SETTINGS\\ASIF\\DESKTOP\\APP\\WEBSITE\\APP_DATA\\DB.MDF'. 无法打开新数据库'C:\\ DOCUMENTS AND SETTINGS \\ ASIF \\ DESKTOP \\ APP \\ WEBSITE \\ APP_DATA \\ DB.MDF'。 CREATE DATABASE is aborted. CREATE DATABASE被中止。 An attempt to attach an auto-named database for file C:\\Documents and Settings\\asif\\Desktop\\App\\Website\\App_Data\\DB.mdf failed. 尝试为文件C:\\ Documents and Settings \\ asif \\ Desktop \\ App \\ Website \\ App_Data \\ DB.mdf附加自动命名的数据库失败。 A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 存在具有相同名称的数据库,或者无法打开指定的文件,或者该数据库位于UNC共享上。

Please suggest me solution to this. 请为我建议解决方案。

Regards, Asif Hameed 问候,Asif Hameed

Version 661 is SQL Server 2008 R2. 版本661是SQL Server 2008 R2。 You are trying to attach a database created with this version to an earlier version of the engine, which is not allowed. 您试图将使用此版本创建的数据库附加到引擎的早期版本,这是不允许的。

Are you trying to use a SQL Server 2008 R2 database in SQL Server 2005? 您是否正在尝试在SQL Server 2005中使用SQL Server 2008 R2数据库? They are not backwards compatible. 它们不向后兼容。

See http://forums.asp.net/p/1560835/3859344.aspx and http://social.msdn.microsoft.com/Forums/en/sqlexpress/thread/2744a003-d61c-4d3d-93c2-af946e141e7e . 请参阅http://forums.asp.net/p/1560835/3859344.aspxhttp://social.msdn.microsoft.com/Forums/en/sqlexpress/thread/2744a003-d61c-4d3d-93c2-af946e141e7e

Edit 编辑

Also, if you have multiple SQL Server engines installed, make sure connection is pointing to the correct one. 另外,如果您安装了多个SQL Server引擎,请确保连接指向正确的引擎。 It might be an instance name like computername\\instance instead of just computername . 它可能是实例名称,例如computername\\instance而不仅仅是computername

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM