Query Timeout Expired Using SELECT/WHERE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,

I am using C# to a SQL Server 2005 database using an SqlDataAdapter,
SqlCommand and SqlDataReader.
When running the query I receive the following exception:
"Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding."

Does anyone know how to increase the timeout value for a query?
Thanks in advance,

Scott
 
Set the CommandTimeout property of the SelectCommand property of the
SqlDataAdapter object you are using.
 
But increasing the timeout should always be the last resort. You should perf
tune your query

Jeff
 
Using Query Analyzer, you can turn on various settings like Graphical
Showplan.

Is this just a single query?

Can you can also just post the code here, with appropriate table definitions
and sample data.

Jeff
 
Back
Top