In Visual Studio 2008, I have database connections in the Server Explorer window that point to SQL Server databases installed locally on my PC.
When I delete one of the connections in goes, but next time I start Visual Studio is is back again.
Does anyone know how to remove them properly?
It isn't a big deal, but it is a bit annoying.
Thanks.
I found the solution to this problem by noticing that the 'deleted' Database Connections only re-appear in Server Explorer when I open the Solution file (previously, I had VS set to open the last project on start-up).
So, knowing it must be something in the solution, I searched the files and I have a Database Project which holds build scripts, etc. In this project, within the *.dbp file, there is a "DBRefFolder" section. The 'deleted' database references were here, and when I deleted them, all was well.
It is a bit annoying that VS doesn't remove these entries properly, but at least I have a solution.
Below is an sample extract from the *.dbp file:
Begin DataProject = "SQL Server Databases"
...
...
...
...
Begin DBRefFolder = "Database References"
Begin DBRefNode = "Name"
ConnectStr = "Data Source=XXX;Initial Catalog=YYY;Integrated Security=True"
Provider = "{91510608-8809-4020-8897-FBA057E22D54}"
Colorizer = 6
End
...
...
...
...
End
End
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With