I'm loading a large amount of data. It's query takes around 1 minute and 20 seconds to execute. Due to which following error appears
SQL SERVER – Timeout expired. The timeout period elapsed prior to completion of the operation
I've searched and implemented the following thing but it's not working.
connection = new SqlConnection(connectionString);
command = connection.CreateCommand();
//everyone saying to set this to increase the query execution time but its not working
command.CommandTimeout = 240;
connection.Open();
command.ExecuteReader();
I'm using C# and loading data in DevExpress Grid and the database.