[英]Error : Fatal error encountered attempting to read the resultset
I want to insert data in a database table from two other tables 我想将数据从其他两个表插入数据库表中
Whenever I run my code, it would return this particular error 每当我运行代码时,它将返回此特定错误
An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll - Additional information: Fatal error encountered during command execution.
MySql.Data.dll中发生了类型为'MySql.Data.MySqlClient.MySqlException'的未处理异常-其他信息:命令执行期间遇到致命错误。
which is pointed at 指着
cmd.ExecuteNonQuery();
What would be the problem? 有什么问题吗?
It's working now !! 现在正在工作!
It simply sounds like your query is timing out during execution. 听起来您的查询在执行期间超时了。 You could try setting cmd.CommandTimeout = 86400;
您可以尝试设置cmd.CommandTimeout = 86400; or you could try creating indexes that might speed up the JOIN: CREATE INDEX bilan_siren ON bilan(siren);
或者,您可以尝试创建可以加快JOIN速度的索引:CREATE INDEX bilan_siren ON bilan(siren); CREATE INDEX data_siren ON data(siren);
CREATE INDEX data_siren ON数据(警笛);
Answer by Bradley Grainger Bradley Grainger的回答
I solved that issue by using a old version of MySQL Net. 我通过使用旧版本的MySQL Net解决了该问题。 In my case, I installed the version 6.4.4 .
就我而言,我安装了6.4.4版本。 But you can download others versions at:
但是您可以从以下位置下载其他版本:
https://downloads.mysql.com/archives/c-net/ https://downloads.mysql.com/archives/c-net/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.