Gunnarsi
Gunnarsi

Reputation: 354

Visual studio wont open mdf file

The problem I have is that I'm unable to open my mdf file in Visual Studio 2010. I installed VS2010 along time ago, but just installed SQL server 2008 R2 few days ago. I made the file in VS2010 and then attach it to SQL server in Management Studio to run a script I have to create all tables and such. I then detach it in Management Studio and try to view it in VS2010 and get an error telling me that I cannot open database version 661. I can only go as high as 655. I know this is because VS2010 is using SQL server 2008, but Management Studio is SQL Server 2008 R2.

How can I make VS2010 compatible with SQL Server 2008 R2?

Upvotes: 1

Views: 3191

Answers (2)

starrr
starrr

Reputation: 1023

I had this problem too, but my problem was solved when I did this:

When you are opening SQL Server Managemnt Studio, in the connect to server window, type "\SQLEXPRESS" after the server name (your server name\SQLEXPRESS), then attach your database. When you detach it, it is compatible with VS2010. I hope this helps you.

Upvotes: 1

Kharaone
Kharaone

Reputation: 597

You simply need to upgrade the local version 2008 Express to R2. You'd be able to open your file after that.

Upvotes: 1

Related Questions