Hi, we configured every possible timeout to 40 seconds.
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=DispatchData;Integrated Security=True; Connection Timeout = 40"); Console.WriteLine(conn.ConnectionTimeout); SqlCommand cmd = new SqlCommand("Select ... a query that takes between 20 and 35 seconds", conn); cmd.CommandTimeout = 40; Console.WriteLine(conn.ConnectionTimeout); //output = 40
SqlDataAdapter da = new SqlDataAdapter(cmd); Console.WriteLine(da.SelectCommand.CommandTimeout); //output = 40 DataSet ds = new DataSet(); da.Fill(ds);
how is it possible to get the following message after 30 seconds?
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
where does it take the 30 seconds?
SQL 2008 R2 Native SQL Client