I am using MySQL 5.0.51b-community-nt on Windows XP. I used the Entity Developer Database Reverse Engineering Wizard to create a DataContext class. When running Linq query against a large database (4 GB) I am getting the following error after 30 seconds:
Devart.Data.MySql: "Lost connection to MySQL server during query"
Is there a way to increase the CommandTimeout value?
Thanks,
Larry
Increasing the CommandTimeout value
You can manually modify the DataContext.cs class like the following:
Code: Select all
public class MySqlDataProvider1: Devart.Data.MySql.Linq.Provider.MySqlDataProvider {
protected override IDbCommand CreateCommand(string commandText, IDbConnection connection) {
Devart.Data.MySql.MySqlCommand cmd = new Devart.Data.MySql.MySqlCommand(commandText, (Devart.Data.MySql.MySqlConnection)connection);
cmd.CommandTimeout = 0;
return cmd;
}
}
[ProviderAttribute(typeof(MySqlDataProvider1))]
public partial class CrmDataContext : Devart.Data.Linq.DataContext