0

I have created database using code-first approach with Entity Framework in Visual Studio 2015. I had to re-install windows on my PC, so after it, I downloaded my archived solution from dropbox and could not run it. I receive following error.

"The database 'aspnet-Sadly-20161110095352' cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported. Cannot open database "aspnet-Sadly-20161110095352" requested by the login. The login failed. Login failed for user 'Myuser'."

How can I support downgrading path or resolve problem with login?

Thanks

Zippy
  • 1,804
  • 5
  • 27
  • 36
sneuly
  • 96
  • 1
  • 9

1 Answers1

0

You should disconnect and reconnect to that database (Server Name, User Name, Password).

In Visual Studio you can use SQL Server Object Explorer.

P.S. You should use Git repositories like GitHub or Bitbucket, not Dropbox ;)

Kuba
  • 226
  • 1
  • 9
  • I have never connected to it with Server Name/User Name/Password, I created it using packet manager console with migrations. – sneuly Nov 16 '16 at 12:00
  • If its local database you can create new one using code-first approach :) After that you can need to edit Web.config file: ` – Kuba Nov 16 '16 at 12:03
  • aspnet-Sadly-2016‌​1110095352 is your old database name. When you create new one you need to change that connection string (my code above is only example, you can have other params in connection string). – Kuba Nov 16 '16 at 12:10
  • How should i copy my solution with local database to another pc, to make sure i wont get this error again? – sneuly Nov 16 '16 at 12:16
  • You need to copy database file .mdf. It should be somewhere here. C:\Users\name\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB – Kuba Nov 16 '16 at 12:25