简体   繁体   中英

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.

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; or you could try creating indexes that might speed up the JOIN: CREATE INDEX bilan_siren ON bilan(siren); CREATE INDEX data_siren ON data(siren);

Answer by Bradley Grainger

I solved that issue by using a old version of MySQL Net. In my case, I installed the version 6.4.4 . But you can download others versions at:

https://downloads.mysql.com/archives/c-net/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM