Exception when calling the Cancel method of the MySqlCommand "Query execution was interrupted."
Posted by: Marciel Ramos
Date: November 09, 2009 08:05AM

Hello,

I'm having the following problem. Using the code below, the application is returning the following error: "Query execution was interrupted". This error is triggered in the call to Cancel () method of command. Only in large tables (over 50 thousand records) this problem occurs.

IDbConnection connection = new MySqlConnection(connectionString);
IDbCommand command = connection.CreateCommand();
command.CommandText = "SELECT * FROM Table";
connection.Open();
IDataReader reader = command.ExecuteReader(CommandBehavior.SingleRow);
using (reader) {
if (reader.Read()) {
object o = reader [0];
}
command.Cancel();
}
connection.Close();

Client version (. NET DLL): 6.2.0.0
Server version: 5.0.45-community-nt

Tks,


Marciel



Edited 1 time(s). Last edit at 11/09/2009 08:14AM by Marciel Ramos.

Options: ReplyQuote


Subject
Written By
Posted
Exception when calling the Cancel method of the MySqlCommand "Query execution was interrupted."
November 09, 2009 08:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.