在 asp 服务器中,我们在执行后遇到 SQL Server 错误,ExecuteScalar
如下所示。错误只会偶尔出现,并不总是出现。所以有人知道为什么会出现这个错误吗?如何解决?ExecuteReader
ExecuteNonQuery
System.Data.SqlClient.SqlException:向服务器发送请求时发生传输级错误。(提供者:TCP 提供者,错误:0 - 现有连接被远程主机强行关闭。)
在 System.Data.SqlClient.SqlConnection.OnError(SqlException异常,Boolean breakConnection) 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
异常,Boolean breakConnection)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
在 System .Data.SqlClient.TdsParserStateObject.WriteSni()
在 System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode)
在 System.Data.SqlClient.TdsParserStateObject.ExecuteFlush()
在 System.Data.SqlClient.TdsParser.TdsExecuteSQLBatch(字符串文本, Int32 超时,SqlNotificationRequest notificationRequest,TdsParserStateObject stateObj)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String 方法, DbAsyncResult 结果)
在System.Data.SqlClient.SqlCommand.ExecuteReader(
CommandBehavior 行为,String 方法)的 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior 行为,String 方法)的System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,布尔 returnStream,String 方法)
( )
在 WinMsg.Page_Load(Object sender, EventArgs e)