How do I set the command timeout in the following situation? Just to clarify, I have already set the connection timeout in the Connection String, but I also need to set the command timeout because I want the query to be able to run 5 minutes if it needs to, but it times out in less than a few minutes.
String reportQuery = @" complicated query returning many rows ";
SqlConnection ReportConnect = new SqlConnection(ConnectionString);
ReportConnect.Open();
DataSet tempDataset = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(reportQuery, ReportConnect);
da.Fill(tempDataset);