开发者

Cannot connect to the database

开发者 https://www.devze.com 2023-03-03 19:16 出处:网络
I have created a database in App_Data开发者_开发知识库 and I want to use this file in my project.

I have created a database in App_Data开发者_开发知识库 and I want to use this file in my project.

In the toolbar I grabbed the sqlDatasource. I clicked on Configure data source. I chose Microsoft SQL Server database file and said continue. I browsed for the file. I chose it then I clicked ok. The following error occurred:

I says the database myweb.mdf cannot be opened because it is version 661 and the server version is 662 and earlier: create database is aborted. The attempt to attached an auto-named database for the \app-data\myweb.mdf failed. A database with the same name exists or specified file cannot be opened or it is located on UNC share.


Sounds like you've upgraded to SQL Server 2008 R2 Whilst the database was created in SQL Server 2008, seems you need to upgrade the database using the database migration wizard

see this answer for a similar problem


Check this: SQL Server: Attach incorrect version 661

You'll have to either upgrade your 2008 SP2 instance to R2, or you have to copy out the data in that database into an 2008 database (eg using the data migration wizard, or something equivalent).

0

精彩评论

暂无评论...
验证码 换一张
取 消