I have the following code, which "sometimes" gives a timeout error
string select = @"query goes here";
connection1 = new SqlConnection("connection string goes ehre");
SqlDataAdapter dataAdapter = new SqlDataAdapter(select, connection1);
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
The error message is:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
How do I extend the timeout period?