-3

The Data Source value in the connection string specifies an instance of SQL Server that is not installed. To resolve this issue, you can either choose to install the matching instance of SQL Server or modify the Data Source value in the connection string.

Visual Studio 2013 Database connection and 2017 connection seem to be running the same Microsoft SQL Connection Client, What's the compatibility differences and how do I Fix this?

Data Source: Microsoft SQL Server Database File (SqlClient)

New Connection String: C:\Users\Shawn\source\repos\Server\database\ClientRegit.mdf

Old connection String: Data Source=(LocalDB)\v11.0;AttachDbFilename="C:\Users\srhea_000\Documents\Visual Studio 2013\Projects\Server\database\ClientRegit.mdf";Integrated Security=True;Connect Timeout=30

These are the two instances of SQL that currently showing on my computer, I currently tried modifying the connection to Microsoft SQL Server as it was on VS2013 but as you can see in the connection string its was using V11.0 and 2017 has V13.0.4001 so I thought the database file would automatically upgrade for the new version of the instances SQL in VS2017, by attaching it when modifying the connection type

enter image description here

The instance of the server is not showing up in the modify connection applet, How come? I'm trying to upgrade but I can not assign an instance of the SQL Server in the connection modification.

enter image description here

This Shows that I attempted to modify the connection so the older version 2013 SQL database file was targeted for update for 2017, but it will not except its own connection string. enter image description here

This shows the error message I get when I try apply the connection string that attaches the database file to the new instance of SQL 2017 enter image description here

shawn
  • 113
  • 1
  • 1
  • 15
  • can you provide the template of the connection string? – Neville Nazerane Feb 05 '18 at 03:37
  • The *compatibility difference* is clearly *the connection string specifies an **instance of SQL Server that is not installed*** - IOW, the connection string tries to connect to an instance named *SQL_INSTANCE_A* and you don't have an instance running on your machine named *SQL_INSTANCE_A*. There is nothing in that message that refers to or implies an invalid SQL Server version or a SQL Server version difference. It does not say *SQL Server version not installed*, it says *an instance that is not installed*. They're vastly different things. – Ken White Feb 05 '18 at 03:41
  • (continued) The message also does not say *install the matching **version** of SQL Server*; it says *install the matching **instance** of SQL Server*. – Ken White Feb 05 '18 at 03:45
  • how then do I add the database to a new instance or can I create an instance and just add the database to a new instance so the connection could be excepted? – shawn Feb 05 '18 at 03:55
  • The reason the questions was asked this way was because Visual studio does give you two error types depending on the way you try to initiate a connection one error message says there may be a compatibility issue or check your connection string so not knowing which one it was I had to specify the question to distinguish what the difference was. but thanks for letting me know it was an instance of the SQL server problem.. – shawn Feb 05 '18 at 04:06
  • This could be a bug still not sure why the current instances are not showing when I try to modify the connection of the DB to get an upgrade. – shawn Feb 05 '18 at 20:31
  • Just let people know who read this question, if you read this and down vote questions that offer points, I think its very unfair of you to down vote questions that offer reputation points if you know a question that can offer answers to this problem then just leave a link to that question so the answer could be found stop down voting question that offer people reputation points very rude and wrong of you. – shawn Feb 10 '18 at 18:13

1 Answers1

1

OK, Guys I figured out how to fix this problem, When programming in an older version of microsoft visual studio 2013, and then if you want to upgrade you need to have the prior program installed, I was orginally transferring the visual studio program from one computer to another that never had visual studio 2013 installed on it.

So, I uninstalled the visual studio 2017, then installed visual studio 2013, made sure all the packages for the program existed on the new computer then installed the Visual 2017, it took all prior SQL instances and added to Visual 2017

This fixed the problem Visual studio 2017 does not automatically upgrade your MDF File like its should, this could be a bug, it should be reported. so the SQL instance from visual studio 2013 is working on visual studio 2017, allowing me to run my prior program in the newer version. it also may allow the update as well.

shawn
  • 113
  • 1
  • 1
  • 15