0

I have created a database in SQL Server 2014 but I don't see it in Visual Studio 2013. I've been trying to figure this out for days to no avail. How can I use the database I created in SSMS in VS 2013? or how can I export it to be used in VS 13?

If I try to open the database from SSMS data folder I get an error. "you don't have permission ..."

But if I copy the .mdf file somewhere else and try to open it I get this error:

db cannot be opened because it is version 782. This server supports version 706 and earlier. a downgrade path is not supported

Any help would really be very much appreciated.

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user1939246
  • 11
  • 1
  • 3
  • 2
    You should be able to create a connection to your SQL Server 2014 instance from within VS 2013 no problem - and then you should see all your databases. That's the *preferred way* of doing things - stop fiddling and copying around `.mdf` files - SQL Server is a **server-based** system - and that's a **good thing!** Leave those databases **on the server** and just connect to them.... – marc_s Mar 27 '15 at 18:12
  • 1
    The other error comes from the fact that VS 2013 ships with SQL Server **2012** Express - which is internal database version 706. You ***cannot*** under any circumstances take a SQL Server **2014** database (internal version: 782) and attach (or restore) it to a SQL Server **2012** instance - that's just not supported. Again: just leave the database *on the server* and you have no such issues! – marc_s Mar 27 '15 at 18:13
  • possible duplicate of [The database cannot be opened because it is version 782. This server supports version 706 and earlier. A downgrade path is not supported](http://stackoverflow.com/questions/26346647/the-database-cannot-be-opened-because-it-is-version-782-this-server-supports-ve) – Ken White Mar 27 '15 at 18:15

2 Answers2

0

Do you have the most recent version of SQL Server Data Tools (https://msdn.microsoft.com/en-us/data/tools.aspx)? I believe it's been updated since initial release to support SQL 2014.

Ryan Nigro
  • 4,389
  • 2
  • 17
  • 23
  • Hi Ryan, Thanks for quick response. I found the answer already here: http://stackoverflow.com/questions/26346647/the-database-cannot-be-opened-because-it-is-version-782-this-server-supports-ve – user1939246 Mar 27 '15 at 18:12
0

Thank you all. I will leave the db alone where it is. I have SSMS 2014 and vs 2013. I thankfully did the following

" Try changing Tools>Options>Data Connections>Database Tools>Data Connections>SQL Server Instance Name. The default for VS2013 is "(LocalDB)\v11.0". Changing to "(LocalDB)\MSSQLLocalDB", for example, seems to work - no more version 782 error."

As from the above link(answer) posted by user1723033 and VikciaR and all is working for now.

Thanks again for your help.

user1939246
  • 11
  • 1
  • 3