Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error adding connection in Server Explorer: "Unable to add data connection. ExecuteScalar requires an open and available connection."

I'm using Visual Studio 2008, and my database is SQL Server 2000.

I want to add a connection to the Server Explorer in VS. The Data source is Microsoft SQL Server (SqlClient). After entering in all my information and I click Test Connection, it is successful.

But when I click OK, I get the error:

Unable to add data connection. ExecuteScalar requires an open and available connection. The connection's current state is closed.

like image 914
Steven Avatar asked Sep 13 '10 18:09

Steven


1 Answers

Restart Visual Studio. Then, restart your computer.

like image 80
Denis Valeev Avatar answered Sep 22 '22 14:09

Denis Valeev