rbtLong
rbtLong

Reputation: 1572

MDF Cannot Connect from Visual Studio

I am getting this error and I have SQL Server 2012 installed anyone know what's wrong? I am trying to attach a database file into my Visual Studio 2010.

The database 'X' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported.

Could not open new database 'X'. CREATE DATABASE is aborted.

An attempt to attach an auto-named database for file X failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Upvotes: 0

Views: 276

Answers (2)

rbtLong
rbtLong

Reputation: 1572

Turns out the problem is with regard to an Express Edition. I cannot use the full version because the mdf file I'm binding requires user instance which is only supported by Express Editions. I downloaded the SQL 2012 Express from this https://www.microsoft.com/betaexperience/pd/SQLEXPWT/enus/default.aspx which allows for LocalDB and all the problems go away.

Upvotes: 0

Brian Knight
Brian Knight

Reputation: 5041

The database file was created and/or attached on a SQL Server instance that was of a newer version than the one you have. If you bring your local instance up-to-date to a newer build, then you should be okay.

More specifically - version 661 is SQL Server 2008 R2. The instance you are attaching (651) to is SQL Server 2008 RTM or SP1. Be sure it is using SQL Server 2012 instance instead of perhaps a local SQL Express instance.

See here: http://www.sqlskills.com/blogs/paul/sql-server-2008-r2-bumps-the-database-version/

Upvotes: 2

Related Questions