I can't get a Sql Server localdb connection to work on a computer that does not have SqlServer Express installed

前端 未结 5 1921
说谎
说谎 2021-02-03 23:42

I have a C# console application written using Visual Studio 2012. In the application I am using a Sql Server localdb connection to a database to store information. This is wor

5条回答
  •  耶瑟儿~
    2021-02-03 23:55

    The problem is when you have both Visual Studio 2013 and Visual Studio 2017 there are two versions of loacal database installed.

    Visual Studio 2013 - (localdb)\v11.0 Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows NT 6.2 (Build 9200: )

    Visual Studio 2017 - (localdb)\MSSQLLOCALDB Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 17134: )

    Before installing Visual Studio 2017 I was able to connect to (localdb)\v11.0, but after installing Visual Studio 2017 I am not able to connect to previous version of SQL Express (localdb)\v11.0, but I am able to connect to (localdb)\MSSQLLOCALDB using C#. I am able to connect to both of them from SQL Server Management Studio without any issues.

提交回复
热议问题