I have using 2 computer to learn C# programming, installed everything the same yet one computer have outdated SQL server. i don't understand why this happen

Rudi Hartono 116 Reputation points
2020-10-09T15:44:49.077+00:00

Hi, please forgive my bad english.

  1. i have 2 computers installed vs 2019 to learn database programming.
  2. i am using a USB drive to save my codes and database (set a fixed drive letter)
  3. idk why everytime i start vs i need to reconnect my database at data connection in server explorer (in this case usually works fine). suddenly today there was this error

31331-ss.jpg

  1. and i looked here and there and install a bunch of stuff of SQL server 2019 thing, yet no avail (at this point, i don't what i am doing already, just googling for advise and follow their instruction, and nothing goes well)
  2. randomly looking at my project folder and found a folder with history of my test run application. i copy that mdf and ldf and replace the error one, and it works. but only for 2 minute this error happen again. please help for advice. thank you.
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,776 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
943 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rudi Hartono 116 Reputation points
    2020-10-10T16:19:05.153+00:00

    Finally i found the solution of my problem.
    I have updated my SQL server editon. but data source at vs still the Localdb of old version, when i am using new sql server data source, settled.

    thank you.

    0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Rudi Hartono 116 Reputation points
    2020-10-10T05:15:13.39+00:00

    And now, all my computer cannot access that database i created with same error statement. really funny.

    0 comments No comments

  2. Erland Sommarskog 101.4K Reputation points MVP
    2020-10-10T09:46:48.677+00:00

    Apparently you have more than one instance on your machine. In a query window, run "SELECT @@version" to see which version you have.

    I believe that Visual Studio can install something for you, probably only the Express Edition with localdb. Which version VS 2019 installs, I don't know, as I don't have VS2019 installed myself. But I would guess it ships with SQL 2017, since SQL 2019 went RTM fairly late in the year, and VS shipped with what was current at the time.

    0 comments No comments

  3. Tom Phillips 17,716 Reputation points
    2020-10-12T12:38:59.983+00:00

    Just to be clear.

    Version 852 is SQL 2016. You are trying to restore a SQL 2019 database to a SQL 2016 database engine. That is not allowed.

    0 comments No comments