本人刚开始学习,在做一个查询功能的时候遇到System.Data.SqlClient.SqlException这个问题,网上查了一下,说是数据库连接问题,但是我数据库已经连接上了,数据库中好几个表,只有这其中一个表出现这个问题,其他表的查询都没有问题,这是什么原因?在 System.Data.SqlClient.SqlException 中第一次偶然出现的“System.Data.dll”类型的异常
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>未处理的异常</Description><AppDomain>HotelManagementSystem.vshost.exe</AppDomain><Exception><ExceptionType>System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)</Message><StackTrace>   在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)数据库C#异常