简体   繁体   中英

The database cannot be opened because it is version 839. This server supports version 782 and earlier. A downgrade path is not supported

I made a C# project that contains a local database (Microsoft SQL Database Server) (mdf) in my pc that works totally fine. but whenever i use my laptop to run it, it gives me this error:

The database 'C:(the path)\\CALENDER.MDF' cannot be opened because it is version 839. This server supports version 782 and earlier. A downgrade path is not supported.

this error appears every time i try to refresh server explorer. i need it to work in my laptop because i use it to make a class presentation.

在此处输入图片说明

After a long researches and tries i figured how to solve this issue. its a bit complicated. i converted the mdf database to and access(mdb) and import data from the mdb to a new mdf database.

these are the steps:

  1. Create an empty access (mdb) database.
  2. using SQL Server 2016 CTP3.0 Import and Export Data: import data from database which is calander.mdf in my case to the new access database (mdb).
  3. now in the destination pc, create a new vs form and add a new empty mdf database.
  4. using Microsoft SQL Server Management Studio ( Databases > right click new database > type database name and click OK.)
  5. Right mouse click on your database name and hover to Tasks and then select the Import Data.
  6. select the data source Microsoft Access (Microsoft Access Database Engine) and browse to the access database and click next.
  7. in Destination select Net Framework Data Provider For SqlServer and type the connection string for the new empty created mdf database. then click next and finish.
  8. Copy the new mdf database To your project file
  9. now you got the new database filled with data and all is left is go to your main project and delete the database and then add new existing item and browse to the new database and log file and clock ok. and the database should work

WORKED WITH ME !!!!!!

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM