1
votes

I have a project created while running 2008r2 express and connecting to an instance named "Sqlexpress". I have recently uninstalled Sql server 2008r2 express and started using the recommended LocalDB. All of my projects updated the database successfully and connect flawlessly with the exception of one, my largest project.

The database updated perfectly but now i get a Error 26 - Network or instance related error each time i try to login in. (iterating through a dataset created in the dataset desinger.

Here is my connection string:

Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True

I can see the connection in Server Explorer and view table data. Any idea why this wouldn't work at runtime on this one project?

2

2 Answers

0
votes

I solved this by opening Dataset.Designer.vb in notepad++ and replacing all instances of ".\SQLEXPRESS" with "(LocalDB\v11.0". I also had to set each instance of "User Instance=True" to False.

0
votes

I solved the same by replacing the "(localdb)\v11.0" with applicable "MyServerName\SQLServerInstanceName" in connection string. During the installation of SQL Server Express 2014, I chose to keep SQLExpress as instance name.