0

I'm using Visual Studio 2019 (not vscode) to manage a C# WinForms project. Initially I was using Microsoft SQL Server in this project, but ran into many issues with connecting to the database. I decided to delete everything related to the database that I knew of, including the database connection, and the database itself.

Yet I have one tab open that I cannot close because it's reporting an error with SQL:

Executed SQL Statement: SELECT TOP 1000 [ProjectLeaderID] ,[FirstName] ,[LastName] ,[EmployeeNumber] ,[Password] FROM [dbo].[ProjectLeader]
Error Source: System.Data
Error Message: The requested operation cannot be completed because the connection has been broken.

enter image description here

Because I can't close this tab, I can't close the project. This error message appears every time I try and close the "dbo.ProjectLeader" tab as shown in the image, and is the same if I try to "Close All Tabs".

I've checked the Server Explorer (shown above) and the SQL Server Explorer (below) for any remaining paraphernalia that would be keeping this tab open. The database was called "AssessmentDatabase", and I can't see any trace of it remaining in the files.

enter image description here

How can I properly update this project so that it contains no references to this database, and so that I can close the project window?

I tried deleting the .suo file as per this question, but this did not help, I still get the error.

Any suggestions for how I can cleanse this solution of the unholy database, and close my project?

Lou
  • 2,200
  • 2
  • 33
  • 66

0 Answers0