当前位置:   article > 正文

mysql 尝试读取超过流末尾的_.net – 尝试读取MySQL中流错误的过去结束

mysql 尝试读取超过流末尾的_.net – 尝试读取MySQL中流错误的过去结束

我遇到MySQL的问题,我有以下错误.

MySqlClient.MySqlException: Fatal error encountered during command execution. --->

MySql.Data.MySqlClient.MySqlException: Fatal error encountered attempting to read the resultset. --->

MySql.Data.MySqlClient.MySqlException: Reading from the stream has failed. --->

System.IO.EndOfStreamException: Attempted to read past the end of the stream.

我在夜间运行时会发生此错误.并且它很少发生,所以很难找到为什么会发生这种情况.我使用.NET 3.5与MySQLConnector 6.2.4.0.

我正在使用以下代码运行它.

public DataSet Read(String query, List> parameters)

{

MySqlDataAdapter adapter = null;

DataSet returnVal = null;

if (query != null && query.Length > 0)

{

try

{

returnVal = new DataSet();

if (connection.State != ConnectionState.Open)

{

connection.Open();

}

qu

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/329936
推荐阅读
相关标签
  

闽ICP备14008679号