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

前端 未结 5 1841
说谎
说谎 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:47

    The problem was related to having Sql Server Express LocalDB 2014 installed instead of 2012. With that version MS has changed the connection string requirements. Instead of Data Source=(LocalDB)\V11.0, the connection string is Data Source=(LocalDB)\MSSQLLocalDB. After changing my connection string the program is running correctly on a computer that only has the LocalDB 2014 installed. Here is a link to an article about it: https://connect.microsoft.com/SQLServer/feedback/details/845278/sql-server-2014-express-localdb-does-not-create-automatic-instance-v12-0

    also

    http://msdn.microsoft.com/en-us/library/hh510202(v=sql.120).aspx

提交回复
热议问题