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

Ste*_*ven 8 .net sql-server visual-studio

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.

Den*_*eev 11

重启Visual Studio.然后,重新启动计算机.

  • restert VS首先,这应该足够了 (7认同)